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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDotNetNuke.Services.Messaging.Data.Message ToRoleID?DotNetNuke.Services.Messaging.Data.Message ToRoleID?
Previous
 
Next
New Post
10/31/2011 7:06 AM
 
Hi,

In my module I need to send a message to users in a role. I have tried using ToRoleID in DotNetNuke.Services.Messaging.Data.Message but the message only gets sendt when sending to users using ToUserID.

I do get a scheduler exception:

AssemblyVersion: 6.0.1

PortalID: -1

PortalName:

UserID: -1

UserName:

ActiveTabID: -1

ActiveTabName:

RawURL:

AbsoluteURL:

AbsoluteURLReferrer:

UserAgent:

DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider

ExceptionGUID: 5e4c5a75-0bfa-40a6-8560-441561856073

InnerException: Object reference not set to an instance of an object.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: DotNetNuke.Services.Messaging.Scheduler.MessagingScheduler.SendMessage

StackTrace:

Message: System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Services.Messaging.Scheduler.MessagingScheduler.SendMessage(Message objMessage) at DotNetNuke.Services.Messaging.Scheduler.MessagingScheduler.DoWork()




I can use SendTokenizedBulkEmail and AddAddressedRole(rolename) instead but I want the message to go to both email and as DNN internal message and I don't want the administrator report.



Siri Monsoey - Triangel Software View Siri Merete Monsøy Elgenes's profile on LinkedIn
 
New Post
10/31/2011 8:35 AM
 
I checked out MessagingScheduler.cs and it completely ignores ToRoleID!

From http://www.java2s.com/Open-Source/ASP.NET/CMS/dotnetnuke/DotNetNuke/Services/Messaging/Scheduler/MessagingScheduler.cs.htm

private void SendMessage(Message objMessage)
{
string senderAddress = UserController.GetUserById(objMessage.PortalID, objMessage.FromUserID).Email;
string fromAddress = _pController.GetPortal(objMessage.PortalID).Email;
string toAddress = _uController.GetUser(objMessage.PortalID, objMessage.ToUserID).Email;


Mail.Mail.SendEmail(fromAddress, senderAddress, toAddress, objMessage.Subject, objMessage.Body);

_mController.MarkMessageAsDispatched(objMessage.MessageID);
}



Siri Monsoey - Triangel Software View Siri Merete Monsøy Elgenes's profile on LinkedIn
 
New Post
11/1/2011 6:55 AM
 
I would expect, this was left out by accident during implementation for the first version.
please log your findings into the public DNN issue tracker at support.dotnetnuke.com

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDotNetNuke.Services.Messaging.Data.Message ToRoleID?DotNetNuke.Services.Messaging.Data.Message ToRoleID?


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