Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <?php
  2. /*
  3. USE SMTP TO SEND MAIL WITHOUT A PLUGIN
  4. */
  5.  
  6. /* Definitions Example Sparkpost*/
  7.  
  8. define ('MAIL_FROM_NAME','Name');
  9. define ('MAIL_FROM_EMAIL','your@email.com');
  10. define ('MAIL_HOST','smtp.sparkpostmail.com');
  11. define ('MAIL_PORT','2525');
  12. define ('MAIL_USERNAME','SMTP_Injection');
  13. define ('MAIL_PASSWORD','password');
  14.  
  15.  
  16.  
  17. /* Our Code */
  18. function jetweb_smtp($phpmailer){
  19.  
  20. $phpmailer->Mailer = "smtp";
  21. $phpmailer->From = MAIL_FROM_EMAIL;
  22. $phpmailer->FromName = MAIL_FROM_NAME;
  23. $phpmailer->Sender = $phpmailer->From; //Return-Path
  24. $phpmailer->AddReplyTo($phpmailer->From,$phpmailer->FromName); //Reply-To
  25. $phpmailer->Host = MAIL_HOST;
  26. $phpmailer->SMTPSecure = $wsOptions["smtpsecure"];
  27. $phpmailer->Port = MAIL_PORT;
  28. $phpmailer->SMTPAuth = TRUE;
  29. if($phpmailer->SMTPAuth){
  30. $phpmailer->Username = MAIL_USERNAME;
  31. $phpmailer->Password = MAIL_PASSWORD;
  32. }
  33. }
  34. add_action('phpmailer_init','wp_smtp');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement