You can consider dynamic email template as a macro that use Razor engine.
The difference between macro and dynamic email template are:
1. In email template there is no current page, so you can't access umbraco content through currentPage
2. Package provide a external method "Arguments" to retrieve arguments are passed to email template.
There are two email sending method in package:
1. automatically, In this way Arguments() will return a dynamic object contain 4 properties.
Email - return current email to address
EmailSource - return a value to indicated where is email to address come from.
1 -- email come from member group
2 -- email come from subscribe
MemberGroupID - return member group id if have
SubscribeTypeID - return subscribe type unique id if have
2. manually, In this way Arguments() will return a dynamic object you passed.
Following is a sample:
Dear @this.Arguments().Email: Thanks for your register. In order to complete your registration you need to verify your email address: Click to verify email address Regards, uWebZone
Dynamic email template introduce
First of all you need to familiar with Razor.
You can consider dynamic email template as a macro that use Razor engine.
The difference between macro and dynamic email template are:
1. In email template there is no current page, so you can't access umbraco content through currentPage
2. Package provide a external method "Arguments" to retrieve arguments are passed to email template.
There are two email sending method in package:
1. automatically, In this way Arguments() will return a dynamic object contain 4 properties.
Email - return current email to address
EmailSource - return a value to indicated where is email to address come from.
1 -- email come from member group
2 -- email come from subscribe
MemberGroupID - return member group id if have
SubscribeTypeID - return subscribe type unique id if have
2. manually, In this way Arguments() will return a dynamic object you passed.
Following is a sample:
Owen, could you post a quick code example of how a unsubscribe would work, when the unsubscribe link is on an email ?
Sure.
There is a method on the class library.
And you can put something like below in the email allow user to unsubscribe:
and in the unsubscribe.aspx page will has the code like below:
Owen,
How do you use subscribeTypeId? Apart from thisAgruments.Email the other properties are empty how do you fill these propertties
is working on a reply...