How to send an email?
-
Can anyone point me to an example of how to send an email using ASP.NET? Thanks, Marc
-
Can anyone point me to an example of how to send an email using ASP.NET? Thanks, Marc
This is from memory (i'm not on a machine with vs.net), but try this: using System.Web.Mail ... ... MailMessage mm = new MailMessage(); mm.To = "anyone@anywhere.com"; mm.From = "anyone@anywhere.com"; mm.Subject = "subject"; mm.Body = "body text"; SMTPMail.Send(mm); Easy, huh? Attachments are also really easy to handle - check out the MSDN for more info. Cheers, Paul
-
This is from memory (i'm not on a machine with vs.net), but try this: using System.Web.Mail ... ... MailMessage mm = new MailMessage(); mm.To = "anyone@anywhere.com"; mm.From = "anyone@anywhere.com"; mm.Subject = "subject"; mm.Body = "body text"; SMTPMail.Send(mm); Easy, huh? Attachments are also really easy to handle - check out the MSDN for more info. Cheers, Paul
Gee, that was easy. Thanks for the info! Marc
-
Gee, that was easy. Thanks for the info! Marc
No problem, glad I could help. Cheers, Paul