Send email

/Send email
Send email 2019-05-22T17:28:21-08:00
IsSMTP(); try { $host_names = explode(".", $_SERVER['HTTP_HOST']); $host_name = 'https://'.$host_names[0].'.'.$host_names[1].'.'.$host_names[2];$message = "Audio Visual Rental Order PO Name ";$mail->Host = "smtp.office365.com"; $mail->SMTPDebug = 3; $mail->SMTPAuth = true; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->Username = "system@zenithav.com"; // SMTP username $mail->Password = "&rxB+A-K3a=5EZLO"; // SMTP password $mail->SetFrom('system@zenithav.com', 'Zenith AV'); $mail->AddAddress('claudio@zenithav.com'); $mail->Subject = "Testing Subject"; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; $mail->Body = $message; $mail->IsHTML(true); // set email format to HTML $mail->Send(); echo "
Message Sent OK


";} catch (phpmailerException $e) { echo $e->errorMessage()."
"; //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage()."
"; //Boring error messages from anything else! } ?>