Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
1,899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. require_once '../assets/mail/PHPMailerAutoload.php';
  2.  
  3. $mail = new PHPMailer(true);
  4. $mail->Mailer = "smtp";
  5. $mail->isSMTP();
  6. $mail->SMTPDebug = 0;
  7. $mail->SMTPAuth = true;
  8. $mail->SMTPSecure = "ssl";
  9. $mail->Host = "smtp.zoho.com";
  10. $mail->Port = 465;
  11.  
  12. $mail->Username = "support@mydomain.in";
  13.  
  14. $mail->Password = "myzohopassword";
  15.  
  16. $mail->SetFrom("support@mydomain.in", "Support MyDomain");
  17.  
  18. $mail->AddAddress($rEmail);
  19.  
  20. $mail->Subject = $subject;
  21.  
  22. $mail->MsgHTML($message);
  23.  
  24. try {
  25. $mail->Send();
  26. return 1;
  27. } catch (phpmailerException $e) {
  28. return $e->getMessage();
  29. } catch (Exception $e) {
  30. return $e->getMessage();
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement