Advertisement
Guest User

Untitled

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