I have the following code:
$message = "Good news! The item# $item_number on which you placed a bid of \$ $bid_price is now available for purchase at your bid price.\n
The seller, $bid_user is making this offer.\n
\nItem Title : $title\n
\nAll the best,\n
$bid_user\n
$email\n
";
echo $message;
$htmlContent = $baseClass->email_friend($item_number, $title, $bid_price, $bid_user, $mcat, $message, $email, $VIEWSTATE, $EVENTVALIDATION, $URL);
The problem is that the new line break (\n) is not working.
Try
\r\nin place of\nThe difference between \n and \r\n
It should be noted that this is applicable to line returns in emails. For other scenarios, please refer to rokjarc’s answer.