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.0Sending Mail in Scheduler with Portal SettingsSending Mail in Scheduler with Portal Settings
Previous
 
Next
New Post
8/27/2006 11:50 AM
 
I've noticed my UserProfile Birthday Schedule task now breaks in DNN 4.3.4 due to the fact that it can't get an instance of the PortalSettings with GetCurrentPortalSettings();
I think this is a new feature as previously I could send emails from the Scheduler.

"
UserProfileBirthday failed.System.NullReferenceException: Object reference not set to an instance of an object.
   at DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings()
   at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, String "

I am aware of Joe Brinkman's blog on getting the current context, but how do I get the PortalSettings to pass into the SendMail method in the scheduler (some sort of loop through all the Portals I guess?)




Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
8/28/2006 2:32 PM
 
For the record, I tried to hardcode a portal value and load my main portal settings but was unsuccessful. Has anyone sent mail using the scheduler in 4.3.3+?

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
8/28/2006 4:27 PM
 
This is very strange - it seems as though the core Events module sends mail in the SendEventNotifications() method - but wont this method also fall over as it has no portal settings?

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
8/28/2006 6:32 PM
 
Nevermind, it seems the GetCurrentPortalSettings call has been removed in 4.3.4 (it was in 4.3.3) - so you can now send mail from the scheduler.

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
5/22/2007 7:42 AM
 

Rodney -

I just started with the scheduler and managed to get it working in my first custom module. Now I'm trying to use Portal-specific details to send with a mail from the scheduler. Did you ever get this working?

I've read Joe's post about context in a scheduled item. How would I go about grabbing the HostSettings to get the SMTP settings as well as inject some portal-specific text into each mail?

Hope you can help.

Cheers


Steve White
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Sending Mail in Scheduler with Portal SettingsSending Mail in Scheduler with Portal Settings


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