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