Hi
we had problem in our email system. the break line ’
’ in the message body doesn’t work in the email client I try to change it to <br/> tags but no use I test my code in browser it work fine.can you help me and thank you
$message = "Hi $FirstName!" ."<br/>".
"Your Account for the Web has been created! Your information is below:" ."<br/>".
"Username:". $username."<br/>".
"Temporary Password (change it when you log-in):". $PlainTextPassword ."<br/>".
"To log in, go to " ."<br/>".
"Make sure you change your password and update your profile information immediately upon logging in!". "<br/>".
"The site is best viewed with FireFox.". "<br/>".
$fromName;
Adding a HTML break (<br />) will only work if you’re sending the email with the appropriate HTML headers, are you doing this?
the previews Developer use the PHPMailer class I don’t know how to add the headers into the code
$fromEmail = "info@studentsofferingsupport.ca";
$fromName = "Info";
$toEmail = $_POST['PrimaryEmail'];
$toName = $_POST['FirstName']." ".$_POST['LastName'];
$subject = "SOS PORTAL New Account Information";
$message = "Hi $FirstName!" ."<br/>".
"Your Account for the Web has been created! Your information is below:" ."<br/>".
"Username:". $username."<br/>".
"Temporary Password (change it when you log-in):". $PlainTextPassword ."<br/>".
"To log in, go to " ."<br/>".
"Make sure you change your password and update your profile information immediately upon logging in!". "<br/>".
"The site is best viewed with FireFox.". "<br/>".
$fromName;
require_once(PORTAL_PATH . '/Communication/functions.php');
require_once(PORTAL_PATH. '/include/PHPMailer_v2.0.4/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "www.hhhh.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "info@hhhh.com"; // SMTP username
$mail->Password = "info"; // SMTP password
$mail->Priority=1;
$mail->From = $fromEmail;
$mail->FromName = $fromName;
$mail->AddAddress($toEmail, $toName);
$mail->AddReplyTo($fromEmail, $fromName);
$mail->WordWrap = 70; // set word wrap to 90 characters
$mail->IsHTML(false); // set email format to HTML
$mail->Subject = $subject;
$mail->Body = $message;
$mail->Send();
Pass TRUE to the IsHTML method instead of FALSE