Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Messaging Email Notifications View modes: 
User avatar
Certified Developer 8
Certified Developer 8
richard - 11/29/2010 11:40:04 PM
   
Messaging Email Notifications
Hello

I am using the messaging webparts, inbox, my messages etc.

I am finding that the users are sent the messages but they are not receiving the email notifications that they have a new message. It is definitely running the line of code MessageInfoProvider.SendNotificationEmail(mi, recipient, currentUser, CMSContext.CurrentSiteName); but the emails are never sent. There are no errors in event log. All other emails are being sent from the site (registration confirmation etc).

Has anyone got any idea's as to why this might be, and how to debug and fix?

Cheers

Richard

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 11/30/2010 5:55:03 AM
   
RE:Messaging Email Notifications
Hi,

Could you please check whether the user has set Messaging notification e-mail in CMS Desk -> Administration -> users -> <user> -> Settings? What version of Kentico CMS are you using?

Best regards,
Ivana Tomanickova

User avatar
Certified Developer 8
Certified Developer 8
richard - 11/30/2010 4:55:26 PM
   
RE:Messaging Email Notifications
Hi Ivana

Thanks for that - that appears to be the issue.

Is there an easy way of setting that Field in the User Settings to default to the users email address?

V 5.5 Social Networking edition.

Cheers

Richard

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 12/2/2010 5:46:57 AM
   
RE:Messaging Email Notifications
Hi,

you can modify file: ~/CMSModules/Messaging/Controls/SendMessage.ascx.cs

line 634:

if (!isIgnored)
{
MessageInfoProvider.SendNotificationEmail(mi, recipient, currentUser, CMSContext.CurrentSiteName);
}


Above function sends notification email to the email address defined in Messaging notification e-mail in CMS Desk -> Administration -> users -> <user> -> Settings

You can create your custom function that will send an email to the default user's email. You can send an email using following code:

CMS.EmailEngine.EmailMessage msg = new CMS.EmailEngine.EmailMessage();
msg.From = "Somebody Surname <somebody@domain.com>"; // use valid e-mail
msg.Recipients = "mail@mail.com"; // use valid e-mail
msg.Subject = "Custom e-mail";
msg.Body = "Text in the body ";
CMS.EmailEngine.EmailSender.SendEmail(msg);


Best regards,
Ivana Tomanickova

User avatar
Certified Developer 8
Certified Developer 8
richard - 12/2/2010 3:18:10 PM
   
RE:Messaging Email Notifications
Thanks Ivana