Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

PHP MIME Encoded Emails Missing Content-Type

Robert Atkinson
Respected Contributor

PHP MIME Encoded Emails Missing Content-Type

I'm running a PHP script on both Windows and VMS.

The script uses the standard mimemessage class from PHP-Classes (http://www.phpclasses.org/mimemessage) to create a mixed text and HTML email message.

When I send the message from Windows, Outlook sees both the text version and HTML version fine.

When I send from VMS, the Content-Type header seems to be missing, and I just get this sort of output :-

Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

This is an HTML message. Please use an HTML capable mail program to read this message.

Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

It looks like the script isn't adding the MIME boundary information from VMS, but at some point it seems to :-

[To] => Rob Alpha , Robert TBS
[Subject] => Testing Manuel Lemos' MIME E-mail composing and sending PHP class: HTML message
[From] => Robert Atkinson
[Reply-To] => Robert Atkinson
[Sender] => robert@xxxxxxxxx
[Return-Path] => robert@xxxxxxxxxx
[X-Mailer] => http://www.phpclasses.org/mimemessage $Revision: 1.70 $ (mail)
[MIME-Version] => 1.0
[Content-Type] => multipart/alternative; boundary="7382dc4684130df990c17829671b46e2"

Any PHP pro's know what's wrong, or can give me some sample code that can output a mixed content email?

Thanks, Rob.