Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. require "../mailer/PHPMailerAutoload.php";
  2. $mail = new PHPMailer;
  3.  
  4. $mail->isSMTP(); // Set mailer to use SMTP
  5. $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
  6. $mail->SMTPAuth = true; // Enable SMTP authentication
  7.  
  8. $mail->Username = $outputMail['email']; // SMTP username
  9. $mail->Password = $outputMail['pass']; // SMTP password
  10. $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
  11. $mail->Port = 587; // TCP port to connect to
  12.  
  13. $mail->AddReplyTo("myemail@domain.com");
  14. $mail->From = "myemail@domain.com";
  15. $mail->FromName = "My Business";
  16. $mail->addAddress($email); // Add a recipient
  17.  
  18. $mail->isHTML(true); // Set email format to HTML
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement