Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    163
    Plugin Contributions
    1

    Default Yet Another HTML Email Query

    Hi folks

    I have been working on a revision of the moneybookers payment module and after a few buggy releases, now have it working fine ... apart from a tiny issue with HTML emails.

    I have created an IPN Handler that is posted to by Moneybookers and it does all it is supposed to except that I noticed that if the Admin has chosen to receive HTML Update Emails, they will get text versions.

    The update emails to customers are fine and in HTML. In addition, I have done the HTML settings in the configuration and receive the admin order confirmation from Zencart as HTML.

    However, the emails sent out to the admin by the IPN script are always as text.

    Here is the email sent.

    Code:
    // construct emails
    $notify_comments = MBOOKERS_EMAIL_COMMENTS_UPDATE . $comments . "\n\n";
    $message = xyz . "\n" . xyz . "\n";
    $message .= etc . "\n\n";
    $html_msg['EMAIL_CUSTOMERS_NAME'] = some data;
    $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = etc;
    $html_msg['EMAIL_TEXT_INVOICE_URL'] = 'abc;
    .
    .
    .
    $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = xyz;
     // update customer
       zen_mail('c_name', 'c_email', 'subject', $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
    // update admin
       zen_mail('', 'a_email', 'subject', $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
    Customers receive HTML and Admins receive text even after setting the admin config to send html.

    * Use MIME HTML When Sending Emails = true
    * Email Admin Format? = HTML

    All other admin emails are in HTML

    I have loaded my own customised version of application_top based on that from the paypal IPN and perhaps I am missing something in there.

    I think I have loaded all the normal files apart from english.php and perhaps one of the gurus can diagnose what the issue is from my description.

    Stuff loaded include

    Code:
    'includes/configure.php'
    'functions_general.php'
    'html_output.php'
    'functions_email.php'
    'extra_functions.php'
    'class.base.php'
    'class.phpmailer.php'
    'class.smtp.php'
    'class.notifier.php'
    'database_tables.php'
    'filenames.php'
    FILENAME_EMAIL_EXTRAS
    In summary:

    1) I have set the configurations settings for admin to receive html
    2) I receive html for other emails
    3) I have a customised "application top"
    4) Emails sent to customers using the exact same zen mail function get delivered as html


    Thanks for your assistance

  2. #2
    Join Date
    Dec 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Yet Another HTML Email Query

    OK

    Looking at functions_email in details suggests that maybe only 'newsletters', 'product_notification' can be sent to admin as html?

    If so, at least I know the situation I was getting was not due to an error or omission.

    Thanks all.

  3. #3
    Join Date
    Dec 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Yet Another HTML Email Query

    Quote Originally Posted by Dayo View Post
    Looking at functions_email in details suggests that maybe only 'newsletters', 'product_notification' can be sent to admin as html?
    That is not the case.

    Every email should be available as html if "_extra" is appended to the template name and ADMIN_EXTRA_EMAIL_FORMAT != 'TEXT' (line 270 of functions_email.php) but for some reason, it is not working for me in this one instance.

 

 

Similar Threads

  1. v151 Yet another query about bulk image association
    By linniedarling in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Feb 2014, 12:19 AM
  2. Yet another shipping challenge
    By Goshawk in forum General Questions
    Replies: 3
    Last Post: 26 Aug 2007, 03:01 AM
  3. Yet another newbie
    By obscura in forum General Questions
    Replies: 2
    Last Post: 30 Aug 2006, 02:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg