Interview Question in SQL Server Triggers


 

Interview Question :: Create mail server using asp


i'm IT student, still new in asp. i'm now developing a system using asp and sql server2000. one of the system's function is:
the system should be able to trigger email automatically to the staff to inform them about something.
how can i do this?using SMTP? i refer to thiese source, but still can't function. it appear server error code 500...
html code:
<form method="POST" action="tizagEmail.asp">
To <input type="text" name="To"/>

From <input type="text" name="From"/>

Subject <input type="text" name="Subject"/>

Body <textarea name="Body" rows="5" cols="20" wrap="physical" > </textarea>
<input type="submit" /></form>

asp code:
<%
Dim mail
Set mail = Server.CreateObject("CDO.Message")
mail.To = Request.Form("To")
mail.From = Request.Form("From")
mail.Subject = Request.Form("Subject")
mail.TextBody = Request.Form("Body")
mail.Send()
Response.Write("Mail Sent!")
'Destroy the mail object!
Set mail = nothing
%>
anyone please help me, thx a lot
Answers to "Create mail server using asp"
RE: Create mail server using asp?

Ewww.

I couldn't say specifically as I tend to stick with MySQL, PHP, Apache, Courier, Cyrus, etc. on Linux systems.



Is there a mail server, like Exchange, actually running on the server and are permissions / connection relationships set properly?

It appears that a 500 error is often a connection problem.

But as with many things of MS "[t]hese errors have a number of causes and can effect many different system configurations."

Check these KB articles, there may be others.

http://support.microsoft.com/kb/311766

http://support.microsoft.com/kb/312839
 
Vote for this answer ::  
RE: Create mail server using asp?

Thats already been done in Ruby. It has already been done using PHP. You basically have it, good work.

http://www.ruby-lang.org/en/

http://svn.ruby-lang.org/cgi-bin/viewvc....

http://wiki.rubyonrails.com/rails/pages/...

Keep hacking and have fun!

Keep it real, keep it free.
 
Vote for this answer ::  
Update Alert Setting