Menu

#48 Email notification using a Win2K email server

open
nobody
None
5
2003-04-24
2003-04-24
Anonymous
No

When trying to use a Win2K system as a MTA, the mail
() function will fail. This seems to be because Windows
can't handle newline characters (\ n). The fix seems to
be to insert a str_replace function before the mail
functions to convert the newlines to c/r characters.

Two lines specifically were placed in the general.php file
in the mailer and htmlmailer functions. The line for the
mailer function is as follows and is placed just before the
call to the mail() function.

$message = str_replace( "\n", "\r", $message );

The line for the htmlmailer() function is as follows:

$body = str_replace( "\n", "\r", $body );

Discussion


Log in to post a comment.

MongoDB Logo MongoDB