General discussion

Locked

how to send mail from ASP page

By sumit_khichi ·
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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Use This for you

by cashrag In reply to how to send mail from ASP ...

Use below code for sending email
//-----------------------
set objmsg = Server.CreateObject("CDONTS.NewMail")
objmsg.From = "<email Id>"
objmsg.To = "<email ID>"
objmsg.Subject = "<email subject>"
lngMsgFormat = "0"
lngMsgEncode = "0"
objmsg.BodyFormat = lngMsgFormat
objmsg.MailFormat = lngMsgEncode
objmsg.Body = "<body u want to send> Messages"

objmsg.Send
set objmsg = nothing

Collapse -

smtp server setup is easy

by gobucksdave In reply to Use This for you

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.

Back to IT Employment Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums