Sending an email message with ASP
September 27th, 2007 | Posted in Programming |
Here is how you send email in ASP. This will use the local server as teh mail server so just send a test email to yourself and see if it works on your server.
<%Set objMsg = Server.CreateObject("CDONTS.NewMail")
objMsg.From = "My Name <email@domain.com>"
objMsg.To = "email@domain.com" ' who do you want to send to?
objMsg.Cc = "secondEmail@domain.com" ' who do you want to CC?
objMsg.Subject = "Subject line"
objMsg.BodyFormat = 0
objMsg.MailFormat = 0
objMsg.Body = "Email message goes here"
objMsg.Send
Set objMsg = Nothing
%>






