Guest User

Untitled

a guest
Jan 19th, 2018
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. $mail = new PHPMailer;
  2. $mail->SMTPOptions = array('ssl' => array('verify_peer' => false,
  3. 'verify_peer_name' => false, 'allow_self_signed' => true));
  4.  
  5. // $mail->SMTPDebug = 4;
  6. $mail->IsMail();
  7. $mail->Host = 'bmstestn@server2.navicosoft.com';
  8. $mail->SMTPAuth = true;
  9. $mail->Username = 'bmstestn@server2.navicosoft.com';
  10. $mail->Password = 'Haroon.Iqbal3';
  11. $mail->SMTPSecure = 'tls';
  12. $mail->Port = 587;
  13.  
  14. $mail->setFrom('bmstestn@server2.navicosoft.com', 'Masterect');
  15. $mail->addAddress('account@yahoo.com', 'Name');
  16. $mail->isHTML(true);
  17.  
  18. $message = "Hi"; // Set email format to HTML
  19.  
  20. $mail->Subject = 'Masterect Order Confirmation';
  21. $mail->Body = $message;
  22. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  23.  
  24. if(!$mail->send()) {
  25. echo 'Message could not be sent.';
  26. echo 'Mailer Error: ' . $mail->ErrorInfo;
  27. }
  28. else {
  29. echo "sent";
  30. }
Add Comment
Please, Sign In to add comment