Guest User

EMAIL SCRIPT

a guest
Dec 12th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. require("class.phpmailer.php");
  4.  
  5. $mail = new PHPMailer();
  6.  
  7. $mail->IsSMTP();
  8. $mail->Host = "smtp.office365.com";
  9.  
  10. $mail->SMTPSecure = "STARTTLS";
  11. $mail->Port = 587;
  12. $mail->SMTPAuth = false;
  13. $mail->Username = "info@vestianglobal.com";
  14. $mail->Password = "{email_password_kept_confidential}";
  15.  
  16. $mail->From = "info@vestianglobal.com";
  17. $mail->FromName = "Test from Info";
  18. $mail->AddAddress("manikandan@odigma.com");
  19.  
  20. $mail->IsHTML(true);
  21.  
  22. $mail->Subject = "Test message from server";
  23. $mail->Body = "Test Mail<b>in bold!</b>";
  24.  
  25. if(!$mail->Send())
  26. {
  27.     echo "Message could not be sent. <p>";
  28.     echo "Mailer Error: " . $mail->ErrorInfo;
  29.     exit;
  30. }
  31.  
  32. echo "Message has been sent";
  33.  
  34. ?>
Add Comment
Please, Sign In to add comment