Hi
I want to build a scheduled task that can send a localised email to a user. For example, we have on module where a user makes a document request. This action will be logged in a table. The batch prog picks up the job and sends the user an email with a link to the document. The job table will contain information about the users locale. It then sends the user an email in their preferred language.
I have no problem with the schedule job and I know how to use DotNetNuke.Services.Mail to send emails. However, I would like to use the languages system to create localised email templates like the core verification & password reminder ones.
I have found this method that would enable me to send the standard notifications based on MessageType.
public static string SendMail( UserInfo user, MessageType msgType, PortalSettings settings )
However, how would I add my own MessageType? The existing types are:
PasswordReminder |
|
ProfileUpdated |
|
UserRegistrationAdmin |
|
UserRegistrationPrivate |
|
UserRegistrationPublic |
|
UserRegistrationVerified |
|
UserUpdatedOwnPassword |
|
ToJson |
I'd like to be able to add something like "DocumentRequestLink". Also, how does one pass in the locale? How does the core dnn framework send a message based on locale?
Any ideas? It would be really useful if someone could explain. I bought Mitchel Sellers book but was a bit dismayed to discover there is absolutely nothing in it about email and notifications and how to extend this. For me and many others I'm sure, email notification is a critical issue. I have spent forever trawling Google and found nothing about this. Some help would be really appreciated.
thanks
Gus