Chris Hammond
 Latest Posts

DotNetNuke Daily Tip #2 Mail.SendMail

Last Updated Wednesday, January 23, 2008 4:51 PM


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("FROM@ADDRESS.COM", "TO@ADDRESS.COM", "", "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.

Posted from weblogs.asp.net/christoc
Recent Comments
There are currently no comments. Be the first to make a comment.
 Tags
  1. 11 items are tagged with .net
  2. 58 items are tagged with asp.net
  3. 44 items are tagged with Autocross
  4. 8 items are tagged with Baseball
  5. 9 items are tagged with Book
  6. 39 items are tagged with Boston Red Sox
  7. 8 items are tagged with California
  8. 29 items are tagged with Community Server
  9. 14 items are tagged with communityserver
  10. 17 items are tagged with Corvette
  11. 26 items are tagged with daily tips
  12. 92 items are tagged with Development
  13. 8 items are tagged with DNN
  14. 175 items are tagged with DotNetNuke
  15. 8 items are tagged with DotNetnuke Conference
  16. 25 items are tagged with DotNetNuke Development
  17. 11 items are tagged with DotNetNuke Tips
  18. 12 items are tagged with DotNetNuke Training
  19. 66 items are tagged with Fitness
  20. 111 items are tagged with Friends
  21. 43 items are tagged with Games
  22. 32 items are tagged with general Software Development
  23. 21 items are tagged with HDTV
  24. 18 items are tagged with Health
  25. 377 items are tagged with Life News
  26. 12 items are tagged with Microsoft
  27. 38 items are tagged with Music
  28. 11 items are tagged with OpenForce 07
  29. 85 items are tagged with Photography
  30. 13 items are tagged with Photos
  31. 89 items are tagged with Pictures
  32. 108 items are tagged with Places to See
  33. 20 items are tagged with Project 240Z
  34. 12 items are tagged with Project 350Z
  35. 21 items are tagged with Red Sox
  36. 19 items are tagged with Red Sox in St. Louis
  37. 7 items are tagged with Saint Louis
  38. 15 items are tagged with SCCA
  39. 416 items are tagged with SEO
  40. 203 items are tagged with Site News
  41. 8 items are tagged with Snow
  42. 8 items are tagged with Solo Nationals
  43. 28 items are tagged with St. Louis
  44. 271 items are tagged with Technology
  45. 33 items are tagged with Travel
  46. 17 items are tagged with Vista
  47. 16 items are tagged with Weblog
  48. 9 items are tagged with World Series
  49. 16 items are tagged with Xbox360
  50. 11 items are tagged with Zune
 Interesting Links
Minimize

Copyright 2010 by Christopher Hammond