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...Using Modules a...Using Modules a...SMTP Setting by PortalSMTP Setting by Portal
Previous
 
Next
New Post
1/30/2015 10:27 AM
 

Hello.

I'm building a simple module that sends an email and i need to get the smtp server, smtp port, smtp username and smtp password at some point. I searched and found solutions that use the host settings, but i want to use the admin settings instead, specific to the portal where the module is working. How can i do that?

Thanks,
Diogo Almeida

 
New Post
1/31/2015 11:57 AM
 
fyi portal level SMTP settings was added in 7.3.0, so if you are using that version or higher you can use them http://www.dnnsoftware.com/wiki/page/... . If you take a look in Website\DesktopModules\Admin\Portals\SiteSettings.ascx.cs you can see them being set/retrieved but in general they're all the same names as the host equivalents. The main difference is there are not encapsulated in a class, but rather storing as portal settings i.e. txtSMTPUsername.Text = Convert.ToString(PortalController.GetPortalSetting("SMTPUsername", portalId, String.Empty));

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/2/2015 5:47 AM
 

thanks, i just did it. Now i'm running into another problem... I'm getting the SMTP password encrypted. How can i get it in plain text?

 
New Post
2/2/2015 11:30 AM
 
ah, my mistake - you can use Host.SmtpPassword, it will detect if smtpportals are enabled and if so return the decoded portal smtp password, otherwise return the decoded host smtp password

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/2/2015 12:25 PM
 
AFAIK, DNN sendmail method uses site SMTP settings automatically

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...SMTP Setting by PortalSMTP Setting by Portal


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