View Full Version : PHP Mail Problem
08-03-2012, 09:40 PM
I have a PHP script on my website that sends mail from a form. Apparently, the ISP mail server was upgraded and now the script wont run. The ISP said that it needs to be modified to use carriage return line feed combos and not a bare carriage return or bare line feed due to some RFC2822 compliance. Can anyone help me with this? Im definitely not a PHP person.
08-03-2012, 11:06 PM
$val = str_replace(array('\r\n', '\r', '\n'), '\r\n', $val);
should replace newline/carriage return variations with carriage return/newline, although you should test it first.
08-03-2012, 11:20 PM
If you're on Linux and maybe Mac, you can use some little apps called dos2unix and unix2dos to convert your script line endings between formats.
08-03-2012, 11:26 PM
Got it all handled, gentlemen. I just added the \r to the \n at each instance and its working fine. Thanks for the replies!!
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.