From: Stefan Fuhrmann (no email)
Date: Mon Jun 25 2007 - 10:32:44 EDT
Thanks for help, Björn
but its not solving our Problem, We tried it without CRLF but the same!
Our php- script:
Header
"MIME-Version: 1.0" . "\r\n";
"Content-Type: multipart/mixed; \r boundary=\"" . "blabla" . "\"" . "\r\n";
"From: " . "" . "\r\n";
"Cc: " . "" . "\r\n";
"Bcc: " . ", " . "\r\n";
"Subject: " . "Test" . "\r\n";
"X-Mailer: PHP/"."5.0.1";
Body
and why this is running with sendmail and not with postfix?
on client it looks like:
"Content-Type: multipart/mixed;
boundary="28A9F1719C22508390E46256F12432DC"
From:
Cc:
X-Mailer: PHP/5.2.1
Message-Id: <20070625142605 dot 0435E536ED at leopard dot aspedia dot de>
Date: Mon, 25 Jun 2007 16:26:04 +0200 (CEST)
This is a multi-part message in MIME format.
--28A9F1719C22508390E46256F12432DC
Content-Type: multipart/alternative;
boundary="89CB3674393E8181A2FF0D248A1E899B"
--89CB3674393E8181A2FF0D248A1E899B
Content-Type: text/html; charset=utf8
Content-Transfer-Encoding: 8-bit
<h1>asdfsdf a<span style="color: rgb(172, 215, 129);">sdf a</span>dsf
asdf</h1>
--89CB3674393E8181A2FF0D248A1E899B--
--28A9F1719C22508390E46256F12432DC--"
The header breaks in mittle not at the beginning!
can somehelp?
tia
stefan
Am Montag, 25. Juni 2007 16:08:42 schrieb Bjørn Ruberg:
> Stefan Fuhrmann <> writes:
> > Hello all,
> >
> > we have an php web application which should send out html mails over
> > localy installed postfix. I had a machine outsite in datacenter which is
> > doing serving and relaying over sendmail. Using this relay the html mails
> > are okay. Now I have to take away the relay and we have to notice the
> > postfix dont deliver html mails now.
> >
> > mail("", "subject", "message", "From: \r\n");
> > using this php and the sendmail relay all is running fine.
> >
> > Leave away the \r or the \n the mails are correct.
> > So \r\n is not working with postfix and breakes the headers.
> > how could this be?
>
> With PHP's mail() function, you should not add \r\n to the last of the
> additional headers. \r\n should be used to *separate* the headers if
> you have two or more. When you have only one, do not use it.
>
> So, this is not a Postfix nor a PHP issue, but a user error. See
> http://www.php.net/manual/en/function.mail.php for more details.
>
> additional_headers (optional)
>
> String to be inserted at the end of the email header.
>
> This is typically used to add extra headers (From, Cc, and
> Bcc). Multiple extra headers should be separated with a CRLF
> (\r\n).
>
> Hope this helps.
|
|
|