Discussion Locked

how to send mail from ASP page

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
please tell me step by step solution to send mail from ASP page.I am using cdo/cdonts object to send mail for this i have to configure the SMTP server.Please guide me to configure the SMTP server for mailing in steps.
Thanks

2 replies

by cashrag

Use below code for sending email
//-----------------------
set objmsg = Server.CreateObject("CDONTS.NewMail")
objmsg.From = ""
objmsg.To = ""
objmsg.Subject = ""
lngMsgFormat = "0"
lngMsgEncode = "0"
objmsg.BodyFormat = lngMsgFormat
objmsg.MailFormat = lngMsgEncode
objmsg.Body = " Messages"

objmsg.Send
set objmsg = nothing

by gobucksdave

the smtp server that cdont uses is in IIS.
administrative tools - internet services manager - right click on the main iis zone - looks like a computer - go to new - smtp server - and set it up. Caution - If There is a mail server on this machine all ready - you will need to choosa a port other than 25 or no one will be able to send mail. - there are a lot of settings for the smtp server to avoid someone using your server as a relay point and so forth - might want to check into a ms tutorial/how to from their site if you've never set one up.

This discussion is closed to new replies.