Hi All,
Does anyone have an example of how to send email using C#?
Please let me know.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ernesto de laPosted Jan 13, 2006, 12:42 PM
what I have to do?
samrajcityPosted Jan 13, 2006, 12:55 AM
hi
System.Web.Mail.MailMessage ObjMailMessage=new System.Web.Mail.MailMessage()
ObjMailMessage.From = FromEmailid
ObjMailMessage.To = toaddress
objMailMessage.Subject = Subject
ObjMailMessage.Body = bodytext
// Create the Object of System.Web.Mail.SmtpMail.SmtpServer class.
System.Web.Mail.SmtpMail ObjSmtpMail = new System.Web.Mail.SmtpMail
//Assign the mail server IP address to the SmtpServer property.
ObjSmtpMail.SmtpServer = SMTPMailServerIP
//Object of the Mail message class is passed in the send function.
ObjSmtpMail.Send(ObjMailMessage)
tks