00939: Issue with Notify.php
Description:
When using the $NotifyFrom
in the Notify function the mail is not properly formed because an extra "BlankLine" is written in the header.
On Debian/Apache2/PHP4/Postfix this could be fixed by removing \r
in from notify.php
With this the mail is correctly created
if (@
$NotifyFrom
)
$NotifyHeaders
= "From: $NotifyFrom
\n$NotifyHeaders
";
I think it's the same whatever version of Linux/PHP/mailserver. Maybe the \r
is needed with windows.
Can someone check on windows so the code could be corrected ?
I can confirm this. On a Debian/Apache I need the bug-fix mentioned above. On my other webspace with Linux/Apache the original notify.php from PmWiki works. It would be helpful to correct this in one of the next versions. By the way, the bug-fix works on both servers.
- Comment by Holger January 08, 2010, at 01:55 PM
PmWiki uses the \r\n (CRLF) between headers because the current standard is defined this way, see RFC 5322 (Header fields are lines beginning with a field name, followed by a colon (":"), followed by a field body, and terminated by CRLF.) The current workaround is to not set a $NotifyFrom
value, but to set From: directly in $NotifyHeaders
like:$NotifyHeaders
= "From: notify@wiki.net\nOtherField: Other Field Body";
I'm not sure that PmWiki should move out of the standard -- this may possibly break existing and future e-mail servers and clients. Admins who require the change can apply the workaround. --Petko January 13, 2010, at 07:27 PM