Question : e-mail form data using SMTP on Exchange

I'm trying to have a form's data be sent via e-mail once it's submitted.  I've done this before using SMTP on IIS.  However, the web server that I'm using is also running Exchange Server; so Exchange Server is now running the SMTP services, rather than IIS.  How do I utilize the SMTP services of Exchange to send the form data?  Do I have to connect via ADO, first?  

Answer : e-mail form data using SMTP on Exchange

this should do it..


Set objMail = Server.CreateObject("CDONTS.NewMail")

objMail.From = Request.Form("From")
objMail.To = Request.Form("To")
objMail.CC = Request.Form("CC")
objMail.BCC = Request.Form("BCC")
objMail.Subject = Request.Form("Subject")

msgBody = "Dear Friend, this email is coming to you from Badgers"

objMail.Body = request.form("mainbody")
objMail.Send
Set objMail = nothing
Random Solutions  
 
programming4us programming4us