Hi All,
Does anyone have an example of how to send email using C#?
Please let me know.
Thanks
How to send email using C#?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
samrajcity51 pointsPosted Jan 12, 2006, 7:55 PM EST
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
ernesto de la2 pointsPosted Jan 13, 2006, 7:42 AM EST
what I have to do?