Advertisement
Guest User

Untitled

a guest
Mar 13th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public static function sendMail($subject, $body, $address) {
  2. $mail = new PHPMailer();
  3. $mail->isSMTP();
  4. $mail->SMTPDebug = 2;
  5. $mail->Debugoutput = 'html';
  6. $mail->SMTPAuth = true;
  7. $mail->SMTPSecure = 'tls';
  8. $mail->Host = 'smtp.live.com';
  9. $mail->Port = 587;
  10. $mail->isHTML();
  11. $mail->Username = 'myMail@hotmail.com';
  12. $mail->Password = 'myMailPass';
  13. $mail->SetFrom('no-reply@gmail.com');
  14. $mail->Subject = $subject;
  15. $mail->Body = $body;
  16. $mail->AddAddress($address);
  17. $mail->Send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement