star6868
asked on
How to put End of Line with PHP - Sendmail ?
I use mail() function of PHP to send mail to GMAIL, YAHOO...
I put <br> for End of Line
But when I view gmail, yahoo mail, The tag <br> is not change, not indicate End of line!
This is the code:
<?php
$to = "my_gmail_acount@gmail.com ";
$subject = ' Wellcome to sendmail of PHP !';
$message = ' This is line 1';
$message.= ' <br>this is Line 2 ';
$message.= ' <br>this is Line 3 ';
$headers = 'From: admin@mydomain.com' . "\r\n".
'Reply-To: admin@mydomain.com' . "\r\n";
mail($to,$subject,$message ,$headers, "-f admin@mydomain.com");
?>
How can I resolve this problem?
Thanks in advanced!
I put <br> for End of Line
But when I view gmail, yahoo mail, The tag <br> is not change, not indicate End of line!
This is the code:
<?php
$to = "my_gmail_acount@gmail.com
$subject = ' Wellcome to sendmail of PHP !';
$message = ' This is line 1';
$message.= ' <br>this is Line 2 ';
$message.= ' <br>this is Line 3 ';
$headers = 'From: admin@mydomain.com' . "\r\n".
'Reply-To: admin@mydomain.com' . "\r\n";
mail($to,$subject,$message
?>
How can I resolve this problem?
Thanks in advanced!
Use \n as angellll suggests, and REMOVE the <br/>. The latter is a html element, you are not sending an html email.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window