Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Sending an email from a custom moduleSending an email from a custom module
Previous
 
Next
New Post
4/21/2011 2:08 PM
 
Is there a standard way to send an email from within a custom module?  I'm creating a custom module and I need to be able to send an email notifying either an admin or a user of an event on the site.  I have added settings to the module to provide me with an email address for the admin and I intend on using the email associated with the user for the second email.  I have also added settings for the basic email content and the rest of the content will be programmatically added to the body of the email.  The question is whether I use standard .NET methods for sending out the email or whether I should use a DNN standard of some sort to do so.
 
New Post
4/21/2011 2:37 PM
 
The DotNetNuke API provides a number of shared SendMail methods for sending email in the DotNetNuke.Services.Mail.Mail class. The advantage of using these is that they can make use of the SMTP server information defined in Host Settings.

As there are a large number of overloads of the Mail.SendMail method I would suggest taking a look at the API source code to best determine which method is most appropriate. The Mail class code is found in the source file Library\Services\Mail\Mail.vb.

You may also want to take a look at the source code for a number of "core" modules which make use of these methods - Feedback, Form and List, Events, Blog to name a few.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
6/8/2011 10:23 AM
 
Thank you very much for the information.  With your pointing me in the right direction I was able to track down the information I needed.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Sending an email from a custom moduleSending an email from a custom module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out