Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <?php
  2. $mail = new PHPMailer(); // create a new object
  3. $mail->IsSMTP(); // enable SMTP
  4. $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  5. $mail->SMTPAuth = true; // authentication enabled
  6. $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
  7. $mail->Host = "smtpout.secureserver.net";
  8. $mail->Port = 465; // or 587
  9. $mail->IsHTML(true);
  10. $mail->Username = "contactus@vowsforeternity.com";
  11. $mail->Password = "xxxxxxx";
  12. $mail->AddReplyTo('contactus@vowsforeternity.com');
  13. $mail->From = "contactus@vowsforeternity.com";
  14. $mail->FromName = "contactus@vowsforeternity.com";
  15. $mail->IsHTML(true);
  16. $mail->Subject = "xxxxxxxxxxx";
  17. $msg='HTML';
  18. $msg=urlencode($msg);
  19. $mail->Body =$msg;
  20. $mail->AddCC("xxxxxxxxxxxxxxx");
  21. $mail->AddBCC("xxxxxxxxxxxxx");
  22. $mail->AddAddress("xxxxxxxxxxxx");
  23. if(!$mail->Send()) {
  24. echo "Mailer Error: " . $mail->ErrorInfo;
  25. } else {
  26. echo "Message has been sent";
  27. }
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement