Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. require_once "Mail.php";
  2.  
  3. $from = "xxx Support <noreply@xxxx.com>";
  4. $to = "$name <$email>";
  5. $subject = "xxxxx";
  6. $body = "xxx";
  7.  
  8. $host = "mail.xxx.com";
  9. $username = "noreply+xxx.com";
  10. $password = "xzcsd=sfd?hdssc";
  11.  
  12. $headers = array ('From' => $from,
  13. 'To' => $to,
  14. 'Subject' => $subject);
  15. $smtp = Mail::factory('smtp',
  16. array ('host' => $host,
  17. 'auth' => true,
  18. 'username' => $username,
  19. 'password' => $password));
  20.  
  21. $mail = $smtp->send($to, $headers, $body);
  22.  
  23. if (PEAR::isError($mail)) {
  24. echo("<p>" . $mail->getMessage() . "</p>");
  25. }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement