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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 5.1.2 - DNN 5.1.2 - 'Enable SSL' SMTP problem
Previous
 
Next
New Post
1/29/2011 4:35 PM
 
I'm using the exact same from email address that I use in the test function on the host admin. That's why I'm thinking that it's something to do with the way that I'm sending the mail. I've tried the SendMail function and also the

DotNetNuke.Services.Mail.Mail.SendEmail(from, to, subject, body);

function. I was under the impression that if I used the SendMail function, that it automatically pulled the data from the host configuration. However, using this has not worked. I'm now trying to use the SendMail function similar to what was in the post (http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/postid/130862/scope/posts/Default.aspx) to see if that will solve the problem. If it does, I'll post my working code for others to see.

-Glenn
 
New Post
2/1/2011 9:40 AM
 
OK, I'm going to post the code that I'm using. If anyone can point out what I'm doing wrong, I'd greatly appreciate it!

string from ="my@gmail.address";
string to = "my@gmail.address";
string subject = "Test Subject";
string body = "Test Body";
string SendMethod = "S";

DotNetNuke.Services.Mail.Mail.SendMail(from, to, "", "", DotNetNuke.Services.Mail.MailPriority.Normal,
subject, DotNetNuke.Services.Mail.MailFormat.Html, System.Text.Encoding.Default,
body,
"",
Convert.ToString(PortalSettings.HostSettings["SMTPServer"]),
Convert.ToString(PortalSettings.HostSettings["SMTPAuthentication"]),
Convert.ToString(PortalSettings.HostSettings["SMTPUsername"]),
Convert.ToString(PortalSettings.HostSettings["SMTPPassword"]), true);


I've also tried the following code to no avail:
DotNetNuke.Services.Mail.Mail.SendEmail(from, to, subject, body);

Thanks in advance!
 
New Post
2/1/2011 1:59 PM
 
I hate to even post this, but for anyone who runs across this thread, it'll be nice to have a working solution.

Somewhere in the all the iterations to test different usernames/server configurations/etc, the password was overwritten in the host settings. I discovered this after going to the host settings to run another test email, only to discover that the test no longer worked.

Any of the solutions in my previous post will actually send a successful email, once the host settings are correct (and saved). I'm guessing that the true cause to my issues was failing to hit "update" after putting in the correct settings and getting the test to work. Obviously, the easiest function to use is the Mail.SendEmail() function.

I hope others find this helpful. :-)
-Glenn
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 5.1.2 - DNN 5.1.2 - 'Enable SSL' SMTP problem


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