Send HTML Newsletter Email to Admin Zencart 1.3.8

In my last project, I designed new newsletter template and created custom newsletter administration area. When I send newsletter to admin to test the email, it does not send HTML email but plain text mail. Scratching my head, I searched Zencart documentation as well as Google for couple hours to find the answer. Now, I will share the solution here, just in case you go through the same pain as me.

First of all, you need to configure your Zencart to use HTML type email. Login to your administrator area and go to configuration > E-mail options.

  1. Make sure your “E-Mail Transport Method” is set appropriately
  2. Use MIME HTML When Sending Emails = “true”
  3. Send E-Mails = true
  4. Email Admin Format? = HTML

Now try to send a newsletter to the admin, if it still sends plain text mail, do the following. Backup and open in your text editor includes/functions/functions_email.php. In your functions_email.php try to find these codes

if (ADMIN_EXTRA_EMAIL_FORMAT == 'TEXT' && substr($module,-6)=='_extra') {
        $email_html='';  // just blank out the html portion if admin has selected text-only

Just below that add the following codes

// if no customer email record found, and admin email format is set to HTML, and sending newsletter, and admin is logged in, use HTML:
if ($customers_email_format_read->RecordCount() == 0 && ADMIN_EXTRA_EMAIL_FORMAT == 'HTML' && in_array($module, array('newsletters', 'product_notification')) && isset($_SESSION['admin_id'])) {
     $customers_email_format = 'HTML';

Now, you should send email in HTML format. Leave comment if it does not work for you or if this post has helped you and save your time.

3 Replies to “Send HTML Newsletter Email to Admin Zencart 1.3.8”

  1. tried it, turned ever page blank both admin and store? soon as I removed the code, website working again?? running v1.3.9h, maybe that was the problem?
    Thanks anyways.

Leave a Reply

Your email address will not be published. Required fields are marked *