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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0SendMail Method in DNNSendMail Method in DNN
Previous
 
Next
New Post
11/5/2007 5:47 AM
 

Hi Guys,

Need some help regarding the DotNetNuke.Services.Mail.Mail.SendMail method. When i try to use this method it is not working. I already have configured the smtp server and the corresponding authentication in the host settings page of DNN and i have been given the message "Email sent succesfully" when i try to click the test button in the host settings page. What seems to be the problem? Any solution. Btw, as an added information, the smtp server i indicated is the ip address of the computer and the authentication that i chose is anonymous. Thanks in advance.

 
New Post
11/5/2007 11:14 AM
 

JR, what problems are you having when you try to use the function? Any error messages?

Also it would be helpful if you post the call you're actually trying to make to see if you're sending the right information.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
11/5/2007 9:16 PM
 

Hi Chris,

Thanks for your reply.

Here is the code i use for the method call:

try

{

 

string smtpServer = Convert.ToString(DotNetNuke.Common.Globals.HostSettings["SMTPServer"]);string smtpAuthentication = Convert.ToString(DotNetNuke.Common.Globals.HostSettings["SMTPAuthentication"]);string smtpUsername = Convert.ToString(DotNetNuke.Common.Globals.HostSettings["SMTPUsername"]);string smtpPassword = Convert.ToString(DotNetNuke.Common.Globals.HostSettings["SMTPPassword"]);string xResult = DotNetNuke.Services.Mail.Mail.SendMail("from@yahoo.com", "to@yahoo.com", "", "", DotNetNuke.Services.Mail.MailPriority.Normal, "This is the Subject!", DotNetNuke.Services.Mail.MailFormat.Text, System.Text.Encoding.UTF8, "This is the Body", "", smtpServer, smtpAuthentication, smtpUsername, smtpPassword);catch(Exception ex)throw ex;

And also, there are no error messages nor exceptions that i have encountered during debugging of this code. i think it just did not sent out any email at all.

Thanks,

JR

 

 

 

 

 

}

 

{

 

}

 
New Post
11/6/2007 2:58 AM
 

Here's the method I've used most recently in one of our modules.

Notice we're just passing empty strings for the SMTP settings and such, DNN handles the rest last I checked

                Mail.SendMail(EmailTo, EmailFrom, "", subject, body, "", "HTML", "", "", "", "");


If you're not getting errors though I'd start by checking with the SMTP folders, see if there are messages being dropped somewhere in there as bad messages.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
11/6/2007 3:34 AM
 

Hi Chris,

I've already tried using this kind of method where you just pass empty string into the smtp server, authentication, username and password but unfortunately it is not working.

And also, may i ask? where can i possibly find the smtp folders that you are talking about? is it in the dotnetnuke folder of my current installation or in iis?

Thanks,

JR

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0SendMail Method in DNNSendMail Method in DNN


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