Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. require 'PHPMailerAutoload.php';
  2.  
  3. $mail = new PHPMailer; $mail->isSMTP();
  4.  
  5. $mail->Host = 'mail.newbirth.in';
  6.  
  7. $mail->SMTPAuth = true;
  8.  
  9. $mail->Username = 'anmol@xyz.in';
  10.  
  11. $mail->Password = 'helloxyz';
  12.  
  13. $mail->Port = 587;
  14.  
  15.  
  16. $mail->setFrom('anmol@newbirth.in', "$email");
  17.  
  18. $mail->addAddress('newbirth@gmail.com', 'new Moment');
  19. $mail->isHTML(true);
  20.  
  21. $mail->Subject = "hello";
  22. $mail->Body = "hello";
  23.  
  24.  
  25. if(!$mail->send()) {
  26. echo 'Message could not be sent.';
  27. echo 'Mailer Error: ' . $mail->ErrorInfo;
  28. exit;
  29. }
  30.  
  31. echo 'Message has been sent';
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement