Configurable Email template within Umbraco content
Hi
I have the requirement to send an email on User Registration, Forgot Password and Order Confirmation.
Now the client wants to make email template configurable within Umbraco content. So they can change subject line, message body, from email address etc.
Can anyone please let me know is it possible or not ? If possible , how i can add dynamic content like for order email i need to add delivery address, their order number etc in email message body.
An approach that we have sometimes used at my work is to invent our own template tags.
So in Umbraco you can setup a section for e-mail receipts and then have a receipt document type where you can allow the editor to customize the receipt.
So you can give them a rich text editor and then invent some template tags like ##NAME##,##PASSWORD## and ##EMAIL## so the editors can write something like
Hi ##NAME##
Your password is ##PASSWORD## and we sent it to you on ##EMAIL##
Then you can do a replace for the "template tags" when you're rendering/sending.
I will try with your way. So what i understand is at the time of sending an email, we need to call that email template, replace (##Name##, <with our value> ) and so on etc ? Am i right ?
Configurable Email template within Umbraco content
Hi
I have the requirement to send an email on User Registration, Forgot Password and Order Confirmation.
Now the client wants to make email template configurable within Umbraco content. So they can change subject line, message body, from email address etc.
Can anyone please let me know is it possible or not ? If possible , how i can add dynamic content like for order email i need to add delivery address, their order number etc in email message body.
So how can i achieve this thing ?
Thanks in advance !
Rohan Dave
Hi Rohan
An approach that we have sometimes used at my work is to invent our own template tags.
So in Umbraco you can setup a section for e-mail receipts and then have a receipt document type where you can allow the editor to customize the receipt.
So you can give them a rich text editor and then invent some template tags like ##NAME##,##PASSWORD## and ##EMAIL## so the editors can write something like
Hi ##NAME##
Your password is ##PASSWORD## and we sent it to you on ##EMAIL##
Then you can do a replace for the "template tags" when you're rendering/sending.
Hope this makes sense.
/Jan
Hi Jan
Thanks for the response.
I will try with your way. So what i understand is at the time of sending an email, we need to call that email template, replace (##Name##, <with our value> ) and so on etc ? Am i right ?
thanks a lot again !
For sending your e-mails I would recommend https://github.com/crossvertise/ActionMailerNext
Dirk has a post about it http://www.netaddicts.be/umbraco/a-developers-take-on-sending-emails-in-umbraco/. The post uses an outdate version on ActionMailer but the idea is the same.
Dave
is working on a reply...