Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Mail Problem

    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.

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    PHP Code:
    $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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,038
    Thanks
    15
    Thanked 240 Times in 240 Posts
    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.

  • #4
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got it all handled, gentlemen. I just added the \r to the \n at each instance and its working fine. Thanks for the replies!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •