Send email with line breaks using mail() in php

后端 未结 5 2061
猫巷女王i
猫巷女王i 2020-12-06 10:42

I am trying to send email using mail() in php. I need the message to be formatted or at least allow line breaks.

$mail = mail(WEBMASTER_EMAIL, $subject, $me         


        
5条回答
  •  萌比男神i
    2020-12-06 11:40

    It's \r\n, as in backslash not forward slash.

    Also you can try it like this:

    $message = "
    
    Hi!
    
    This is one line.
    
    And this is another.
    
    
    
    Bye!
    ";
    

提交回复
热议问题