This is a first version of a new mailer for umbraco v4. It’s similar to the ultrasimplemailer but one main difference is that it isn’t a datatype but it’s a new item in the context menu. Since it needs rendertemplate support it’s only possible to use it with v4.0.1 and upper versions.
After Installation you’ll have a new item in the context menu: send as mail.
Hitting this option will open a new modal. Where you’ll be able to send a published document as a mail.
The document needs to be published because the mail contents will be fetched from the rendered document output. Trying this on an un-published document will result in an error message.
In the first step you’ll need to supply:
- From emailaddress
- From display name
- Subject (this will be the document name but can be chanched)
And choose to send it to a single email address or to multiple (mass option).
When sending a single mail you’ll just need to supply an email address. If a member is found with that email address his data will be merged (more about the merging below).
Choosing the mass option will allow to select a membergroup and to supply a filter.
For example if you have a property on your membertype with the alias unsubscribe of the type true/false and you only want to send to members that don’t have this set to true.
You can supply the filter
Once everything is set it’s just a matter of hitting the send button and you’ll see the progress in the status part.
Merging member data
It’s possible to merge member data. If one of these are found then they will be replaced
Custom properties are also possible
So something like
Your password is: [memberPassword]
Will be recieved by the member as
Your password is: 1234
Another detail is that if there are images they will be added as a linked resource.
The package will also add an xslt extension, making it possible to send a rendered page directly to an email address or a member from xslt (with merging of data).
And it’s also possible to use the methods from .net.
A quick example:
I have setup a forgot password page that looks like this when previewed:
And I would like to use the asp.net PasswordRecovery control to send this mail instead of the regular passwordrecovery mail.
So all I need to do is override the PasswordRecovery mail using the SendingMail event.
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
“Password recovery Mail”,
e.Cancel = true;
And call the SendMailFromPageToMember method, supply a from email address, the member (using umbraco.cms.businesslogic.member) , the subject and the id of the page.
Mail Engine Package download