cfmail stripping style tag when font-family non standard included

40 views
Skip to first unread message

Duncan Isaksen-Loxton

unread,
Jul 26, 2016, 8:24:08 PM7/26/16
to Lucee
Hi folks, 

This is the HTML we are using:

<td style="color:##474747;font-family:'Helvetica Neue',Helvetica,arial,sans-serif;font-size:34px;line-height:36px;padding-top:0;padding-bottom:8px;font-weight:300" align="center" st-title="fulltext-heading"><center>Thank You for Claiming</center></td>

It is coming out in gmail, outlook and others as: 

<td align="center"><center>Thank You for Claiming</center></td>

I thought for a while it was the mail server (sending or receiving) but after some testing I found that if I use this (note the removal of 'Helvetica Neue'): 

<td style="color:##474747;font-family:Helvetica,arial,sans-serif;font-size:34px;line-height:36px;padding-top:0;padding-bottom:8px;font-weight:300" align="center" st-title="fulltext-heading"><center>Thank You for Claiming</center></td>

It is not touched and styling comes out fine. I have verified this on a number of different clients and mail servers. The HTML works fine when sending from Mailchimp & Campaign Monitor too, so I am 99% sure its cfmail on Lucee 4.5.3.018 final. 

Here is the test script (replace your mail server details at the top to give it a go). If you can verify this for me, I wonder if its a bug in Lucee? 

Thanks! 

<cfset attributes.from = "fr...@domain.com" />
<cfset attributes.subject = "HTML test" />
<cfset attributes.smtpserver = "smtp.gmail.com">
<cfset attributes.smtpusername = "us...@domain.com">
<cfset attributes.smtppassword = "password">

<cfmail to="#attributes.to#"
   from="#attributes.from#"
   subject="Plain text: #attributes.subject#"
charset="UTF-8"
username="#attributes.smtpusername#"
password="#attributes.smtppassword#"
server="#attributes.smtpserver#" port="465" 
        usetls="true"
        useSSL="yes">

<table width="560" align="center" cellpadding="0" cellspacing="0" border="0" class="devicewidthinner">
  <tbody>
     <!-- spacing -->
     <tr>
        <td width="100%" height="10" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     
     <!-- Title -->
     <tr>
        <td style="color:##474747;font-family:'Helvetica Neue',Helvetica,arial,sans-serif;font-size:34px;line-height:36px;padding-top:0;padding-bottom:8px;font-weight:300" align="center" st-title="fulltext-heading"><center>Thank You for Claiming</center></td>
     </tr>
     <!-- End of Title -->
     <!-- spacing -->
     <tr>
        <td width="100%" height="20" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     <!-- End of spacing -->
     <!-- content -->
     
     <!-- End of content -->
  </tbody>
</table>


</cfmail>

<cfmail to="#attributes.to#"
   from="#attributes.from#"
   subject="With font family: #attributes.subject#"
charset="UTF-8" type="text/html"
username="#attributes.smtpusername#"
password="#attributes.smtppassword#"
server="#attributes.smtpserver#" port="465" 
        usetls="true"
        useSSL="yes">

<table width="560" align="center" cellpadding="0" cellspacing="0" border="0" class="devicewidthinner">
  <tbody>
     <!-- spacing -->
     <tr>
        <td width="100%" height="10" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     
     <!-- Title -->
     <tr>
        <td style="color:##474747;font-family:'Helvetica Neue',Helvetica,arial,sans-serif;font-size:34px;line-height:36px;padding-top:0;padding-bottom:8px;font-weight:300" align="center" st-title="fulltext-heading"><center>Thank You for Claiming</center></td>
     </tr>
     <!-- End of Title -->
     <!-- spacing -->
     <tr>
        <td width="100%" height="20" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     <!-- End of spacing -->
     <!-- content -->
     
     <!-- End of content -->
  </tbody>
</table>


</cfmail>


<cfmail to="#attributes.to#"
   from="#attributes.from#"
   subject="No font : #attributes.subject#"
charset="UTF-8" type="text/html"
username="#attributes.smtpusername#"
password="#attributes.smtppassword#"
server="#attributes.smtpserver#" port="465" 
        usetls="true"
        useSSL="yes">

<table width="560" align="center" cellpadding="0" cellspacing="0" border="0" class="devicewidthinner">
  <tbody>
     <!-- spacing -->
     <tr>
        <td width="100%" height="10" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     
     <!-- Title -->
     <tr>
        <td style="color:##474747;font-family:Helvetica,arial,sans-serif;font-size:34px;line-height:36px;padding-top:0;padding-bottom:8px;font-weight:300" align="center" st-title="fulltext-heading"><center>Thank You for Claiming</center></td>
     </tr>
     <!-- End of Title -->
     <!-- spacing -->
     <tr>
        <td width="100%" height="20" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;"> </td>
     </tr>
     <!-- End of spacing -->
     <!-- content -->
     
     <!-- End of content -->
  </tbody>
</table>


</cfmail>







Reply all
Reply to author
Forward
0 new messages