ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Auto-Generated Emails Not Being Sent as HTML

November 21, 2012 4:32pm

Subscribe [1]
  • #1 / Nov 21, 2012 4:32pm

    KMGDEV

    121 posts

    This question may be related to a resolved thread.

    In Admin > Email Configuration, I set “Default Mail Format” to “HTML”. Then I went to Design > Message Pages > Email Notifications and entered the following code into the “Member Account Activation Instructions” template:

    <html>
     <head>
      <title>{site_name} Member Account Activation</title>
    
      <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
    
      <style type="text/css">
       .list a {
        color: #cc0000; 
        text-transform: uppercase; 
        font-family: Verdana; 
        font-size: 11px; 
        text-decoration: none;
       }
       p {
        color: #3e3f3a; 
        font-family: Verdana; 
        font-size: 13px; 
        line-height: 20px;
       }
       h1 {
           color: #850d6f; 
           font-family: Verdana; 
           font-size: 16px; 
           font-weight:normal;
       }
       a:link, a:visited {
        color: #4a94ad;
       }
      </style>
     </head>
     
     <body marginheight="0" topmargin="0" marginwidth="0" bgcolor="#fff" leftmargin="0">
      <table border="0" cellspacing="0" cellpadding="0" width="600">
       <tr>
        <td bgcolor="#850d6f" height="72">
         {site_url}/images/email/logo_03.png
        </td>
       </tr>
       <tr>
        <td>
         <h1>Thank you for your new member registration.</h1>
    
         To activate your new account, please visit the following URL:
    
         {unwrap}{activation_url}{/unwrap}
    
         Thank You!
    
         --<a href="http://{site_url}">{site_name}</a>
        </td>
       </tr>
      </table>
      
      <!-- footer -->
      <table cellspacing="0" border="0" height="202" cellpadding="0" width="600">
       <tr>
        <td class="copyright" height="100" align="center" valign="top" width="600" colspan="2">
         
    
        © <a href="http://{site_url}">{site_url}</a>
    
         <a href="http://{site_url}contact-us">Contact Us</a> | <a href="http://{site_url}privacy-policy-and-terms-of-use">Privacy Policy and Terms of Use</a>
        </td>
       </tr>
      </table>
     </body>
    </html>

    But when I do a test member registration, the email received is in plain text (the HTML code is visible as text). The content-type of the email is “text/plain”.

    HTML email sent via the communication pane is sent correctly with a content-type of “multipart/alternative”.

    HTML email sent with MX Notify Control is also sent with the correct content-type.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases