Subject = $subject; $mail->Body = $contents;//"This is the HTML message body in bold!"; $initialfrom = $from; $mail->IsSMTP(); // set mailer to use SMTP //$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server $mail->Host = $mail_server; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = $mail_server_username ;//$smtp_username; // SMTP username $mail->Password = $mail_server_password ;//$smtp_password; // SMTP password $mail->From = $from; $mail->FromName = $initialfrom; $mail->AddAddress($to); // name is optional $mail->AddReplyTo($from); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email format to HTML $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent.
"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } } ?>