Re: problems with creating both HTML and plaintext emails

From: Sam (sam_at_email-scan.com)
Date: 01/21/05


Date: Thu, 20 Jan 2005 19:03:16 -0600


news@celticbear.com writes:

> Below will be the PHP script I'm using to create the message.
> But what's happening is that it appears to work fine in the major
> E-mail clients like Outlook and Thunderbird, but doesn't work in Kmail
> or Evolution or other clients.
>
> What am I doing wrong?

> "Content-Type:multipart/alternative;\n" .
> " boundary=\"{$mime_boundary}\r\n\"";

Bug #1. For starters, you're using LF everywhere else, and here you have
CRLF. Furthermore, it's misplaced. It should be after the closing quote.

You'll have to investigate whether PHP's mail() functions expects all lines
to be terminated by LF, or CRLF. I don't recall offhand. Then you must
change your code and use a consistent EOL.

> <title>HTML MSG HERE</title>
> </head>
> <body bgcolor=\"#ffffff\">
> </body>
> </html>
> ".
> "--{$mime_boundary}\n
> ";

Bug #2. The closing boundary delimiter should have a trailing "--".






Relevant Pages

  • Re: Outlook Express Emails
    ... Outlook Express can access pop mail on ... pop-capable E-mail clients, ... Microsoft MVP - Windows Desktop Experience ...
    (microsoft.public.windowsxp.general)
  • Re: why>?
    ... So you don't know how e-mail clients like Outlook store e-mail? ... database, just one with a different format than MDB or SQL Server ... lacking a SQL query interface. ...
    (microsoft.public.excel)
  • Re: Outlook Express Emails
    ... Outlook Express can access pop mail on ... pop-capable E-mail clients, ... With web mail and a proper password, it was okay while using a web browser. ...
    (microsoft.public.windowsxp.general)
  • Re: why>?
    ... Outlook DOES have a sql interface. ... So you don't know how e-mail clients like Outlook store e-mail? ... database, just one with a different format than MDB or SQL Server ... lacking a SQL query interface. ...
    (microsoft.public.excel)
  • Re: Issues with Outlook 2003
    ... Sue Mosher, Outlook MVP ... > I think Outlook 2003 is becoming on of the worst e-mail clients. ... > spam filter and the wrong contact folder. ...
    (microsoft.public.outlook)