Hello and thanks in advice
First of all it's a great work.
i'm working on the sending mail to the imported user.
I need some info/help , because we need to send mail in html with a bit
of style,
i'm getting all the process of sending mail working prety fine, but it
seem that
all the content of the mail template is inserted as plain text, as example
Thanks for your email. There seems to be an encoding issue when editing throug the web interface when you want to use HTML. What you can do is is open the file /umbraco/plugins/CMSImport/Config/cmsImport.config then replace the mailCredentialsTemplate with the following and then it should work.
from the same umbraco site i'm sending other emails with the same style and the same tag structure, all my client(i'm trying with different client to see how it looks)
are displaying those mails well.
i'm sending email with uCommerce, and with a custom macro.
I will add your feature request to the Backlog so it will come within a future release. Don't think it will be in 2.0 directly since that is already a huge release.
Mail template html problem
Hello and thanks in advice
First of all it's a great work.
i'm working on the sending mail to the imported user.
I need some info/help , because we need to send mail in html with a bit of style,
i'm getting all the process of sending mail working prety fine, but it seem that
all the content of the mail template is inserted as plain text, as example
<STYLE TYPE="text/css"> body { background: #1D140F; color: #91807F; font: 10px 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 0; padding: 0; text-align: center; } table { border-collapse: collapse; margin: 10px 5px;font-size:0.9em;} tr { background: none repeat scroll 0 0 #130D0A; } th, td { border-style: solid;border-width: 1px;text-align: left;} td { border-color: #231A14;padding: 0.7em 1em; } th { background-color: #45561B; border-color: #647C28 #586A22 #43511A #5A6F23; color: #FFFFFF; font-weight: bold; padding: 0.8em 1em; } h1, h2, h3, h4 { color: #F0E8E8;font: bold 1em/1.5em 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 3px 20px; } h4 { font-size: 1.7em; } </STYLE> <center>A user account is created for you!<br/> Login with:<br/><br/> login:ITALIA3 pass:[pyz4-9<br/><br/> Have FUN!!
is there any another place where do i have to setup the mail template?
regards
Fabio
Hi Fabio,
Thanks for your email. There seems to be an encoding issue when editing throug the web interface when you want to use HTML. What you can do is is open the file /umbraco/plugins/CMSImport/Config/cmsImport.config then replace the mailCredentialsTemplate with the following and then it should work.
Hope this helps you,
Richard
Hi Richard, thanks for your fast answer
now mail template is
<mailCredentialsTemplate>
<STYLE TYPE="text/css">
body { background: #1D140F; color: #91807F;font: 10px 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 0; padding: 0; text-align:center; }
table { border-collapse: collapse; margin: 10px 5px;font-size:0.9em;}
tr { background: none repeat scroll 0 0 #130D0A; }
th, td { border-style: solid;border-width: 1px;text-align: left;}
td {border-color: #231A14;padding: 0.7em 1em; }
th { background-color:#45561B; border-color: #647C28 #586A22 #43511A #5A6F23; color: #FFFFFF;font-weight: bold; padding: 0.8em 1em; }
h1, h2, h3, h4 { color:#F0E8E8;font: bold 1em/1.5em 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 3px 20px; }
h4 { font-size:1.7em; }
</STYLE>
<center>
<table>
<tr><td colspan="2">blah blah blah, <br/> blah blah:</td></tr>
<tr><td>login:</td><td>[#loginname]</td></tr>
<tr><td>Password:</td><td>[#password]</td></tr>
</table>
</center>
</mailCredentialsTemplate>
BUt as resutl i'm getting
body { background: #1D140F; color: #91807F;font: 10px 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 0; padding: 0; text-align:center; } table { border-collapse: collapse; margin: 10px 5px;font-size:0.9em;} tr { background: none repeat scroll 0 0 #130D0A; } th, td { border-style: solid;border-width: 1px;text-align: left;} td {border-color: #231A14;padding: 0.7em 1em; } th { background-color:#45561B; border-color: #647C28 #586A22 #43511A #5A6F23; color: #FFFFFF;font-weight: bold; padding: 0.8em 1em; } h1, h2, h3, h4 { color:#F0E8E8;font: bold 1em/1.5em 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 3px 20px; } h4 { font-size:1.7em; }blah blah blah, blah blah: login:admita3Password:Kl@W}]^
Any idea?
FAbio
Ok so the style element doesn't get parsed in your email client. can't you use inline styling for the template?
HI
i have som doubt about that,
from the same umbraco site i'm sending other emails with the same style and the same tag structure, all my client(i'm trying with different client to see how it looks)
are displaying those mails well.
i'm sending email with uCommerce, and with a custom macro.
Fabio
Weird and if you put an CData element around the HTML?
Hi richard
first of all, i didn't tried yet with CDATA.
i'll do the test in the early afternoon,.
To use inline style i'll have to insert at least the body tag, can i do it?
OR the send mail code insert it?
FAbio
hi richard i've tried now with cdata and the following template, now the mail looks pretty good.
<mailCredentialsTemplate>
<![CDATA[
<html>
<head></head>
<body>
<STYLE TYPE="text/css">
body { background: #1D140F; color: #91807F;font: 10px 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 0; padding: 0; text-align:center; }
table { border-collapse: collapse; margin: 10px 5px;font-size:0.9em;}
tr { background: none repeat scroll 0 0 #130D0A; }
th, td { border-style: solid;border-width: 1px;text-align: left;}
td {border-color: #231A14;padding: 0.7em 1em; }
th { background-color:#45561B; border-color: #647C28 #586A22 #43511A #5A6F23; color: #FFFFFF;font-weight: bold; padding: 0.8em 1em; }
h1, h2, h3, h4 { color:#F0E8E8;font: bold 1em/1.5em 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 3px 20px; }
h4 { font-size:1.7em; }
</STYLE>
<center>
<table>
<tr><td colspan="2">blah blah blah, <br/> blahblahblahblah :</td></tr>
<tr><td>login:</td><td>[#loginname]</td></tr>
<tr><td>Password:</td><td>[#password]</td></tr>
</table>
</center>
</body>
</html>
]]>
in the afternoon i'll do more test, and i'll send you back a final confirmation
it think that CDATA and ading the html,body, etc... do the trick.
many thanks.
Fabio
</mailCredentialsTemplate>
HI Fabio,
Great that it's working now. Yes please let me know if your final template works and also if I need to update the config file out of the box.
Cheers,
Richard
hi richard
i can immidiatly tell you a couple of things about the inline editing of the cofnig file,
1. i don't know why, but all the template is displayed on 1 orw pressing enter has no effect on the text, but
pressing enter you save the file.(al least using firefox 3.6 not tested on other browser)
2. looking the config file in a text editor, after saving from umbraco admin gui looks like the following
<mailCredentialsTemplate> &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;STYLE TYPE="text/css"&gt; body { background: #1D140F; color: #91807F;font: 10px 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 0; padding: 0; text-align:center; } table { border-collapse: collapse; margin: 10px 5px;font-size:0.9em;} tr { background: none repeat scroll 0 0 #130D0A; } th, td { border-style: solid;border-width: 1px;text-align: left;} td {border-color: #231A14;padding: 0.7em 1em; } th { background-color:#45561B; border-color: #647C28 #586A22 #43511A #5A6F23; color: #FFFFFF;font-weight: bold; padding: 0.8em 1em; } h1, h2, h3, h4 { color:#F0E8E8;font: bold 1em/1.5em 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; margin: 3px 20px; } h4 { font-size:1.7em; } &lt;/STYLE&gt; &lt;center&gt; &lt;table&gt; &lt;tr&gt;&lt;td colspan="2"&gt;blash blah....., &lt;br/&gt; blah blah:&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;login:&lt;/td&gt;&lt;td&gt;[#loginname]&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;[#password]&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/center&gt; &lt;/body&gt; &lt;/html&gt;</mailCredentialsTemplate>
Fabio
I?ve done some more test, now the html mail is display exactly as my other mails.
so i mark the post solved.
just a little feature request, i manage 7 languages on site i working on, having a template for each language code will be great.
thanks for your help.
Fabio
Thanks,
I will add your feature request to the Backlog so it will come within a future release. Don't think it will be in 2.0 directly since that is already a huge release.
Thanks,
Richard
is working on a reply...