· Chris Hammond
Last Updated

DotNetNuke Daily Tip #2 Mail.SendMail

Learn how to send emails from your DotNetNuke modules with these simple methods from Chris Hammond. Get expert tips for your DotNetNuke projects today!

Learn how to send emails from your DotNetNuke modules with these simple methods from Chris Hammond. Get expert tips for your DotNetNuke projects today!

check out all of the DotNetNuke Daily Tips from Chris Hammond.

DotNetNuke Daily Tip for 6/23/2006

Have you ever needed to send mail from one of your DotNetNuke modules? Here's the DotNetNuke method for sending off a message.

public static System.String SendMail ( System.String MailFrom , System.String MailTo , System.String Cc , System.String Bcc , DotNetNuke.Services.Mail.MailPriority Priority , System.String Subject , DotNetNuke.Services.Mail.MailFormat BodyFormat , System.Text.Encoding BodyEncoding , System.String Body , System.String Attachment , System.String SMTPServer , System.String SMTPAuthentication , System.String SMTPUsername , System.String SMTPPassword )

But what does that really mean? Here's a simple call to the mail function from a module.

Mail.SendMail("[email protected]", "[email protected]", "", "THIS IS THE SUBJECT", "THIS IS THE MESSAGE BODY", "", "HTML", "", "", "", "" );

Could it get any simpler than that?

Actually it could! Here's another signature for sendmail

public static System.String SendMail ( System.String MailFrom , System.String MailTo , System.String Bcc , System.String Subject , System.String Body , System.String Attachment , System.String BodyType , System.String SMTPServer , System.String SMTPAuthentication , System.String SMTPUsername , System.String SMTPPassword )

 

Do you have a question about DotNetNuke? Perhaps I can answer it here as a Daily DotNetNuke Tip! Email chris.hammond at dotnetnuke.com  with your question! Be sure to put Daily Tips in the subject line.

Back to Blog

Related Posts

View All Posts »