Guest User

Untitled

a guest
Jan 16th, 2019
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. add_action( "phpmailer_init", "send_smtp_email" );
  2. function send_smtp_email( $phpmailer ) {
  3. ini_set("sendmail_from","xyz@gmail.com");
  4. ini_set("sendmail_path","xyz@gmail.com");
  5. // Define that we are sending with SMTP
  6. $phpmailer->isSMTP();
  7. // The hostname of the mail server
  8. $phpmailer->Host = "localhost";
  9. // Use SMTP authentication (true|false)
  10. $phpmailer->SMTPAuth = false;
  11. // SMTP port number - likely to be 25, 465 or 587
  12. $phpmailer->Port = "25";
  13. // Encryption system to use - ssl or tls
  14. $phpmailer->SMTPSecure = "tls";
  15.  
  16. $phpmailer->From = "xyz@gmail.com";
  17. $phpmailer->FromName = "XYZ";
  18. }
  19.  
  20. $headers = array('MIME-Version: 1.0'.'From: '.$_POST['namee'].'<'.$_POST['email'].'>'.'Reply-To: '.$_POST['email']);
  21. $comment = $comment . "rn" . "rnIP Address: " . $id . "rnUser Agent: " . $browser . "rnReferrer: " . $referrer;
  22. wp_mail($to,$website,$comment,$headers);
  23.  
  24. add_action( "phpmailer_init", "send_smtp_email" );
  25. function send_smtp_email( $phpmailer ) {
  26. // ini_set("sendmail_from","xyz@gmail.com");
  27. // ini_set("sendmail_path","xyz@gmail.com");
  28. // Define that we are sending with SMTP
  29. $phpmailer->isSMTP();
  30. // The hostname of the mail server
  31. $phpmailer->Host = "localhost";
  32. // Use SMTP authentication (true|false)
  33. $phpmailer->SMTPAuth = false;
  34. // SMTP port number - likely to be 25, 465 or 587
  35. $phpmailer->Port = "25";
  36. // Encryption system to use - ssl or tls
  37. $phpmailer->SMTPSecure = "tls";
  38.  
  39. // $phpmailer->From = "xyz@gmail.com";
  40. // $phpmailer->FromName = "XYZ";
  41. }
Add Comment
Please, Sign In to add comment