Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. add_action( 'phpmailer_init', 'wpse8170_phpmailer_init' );
  2. function wpse8170_phpmailer_init( PHPMailer $phpmailer ) {
  3. $phpmailer->Host = 'godadysmtpsampledomain.secureserver.net';
  4. $phpmailer->Port = 465; // could be different
  5. $phpmailer->Username = 'sender@mysite.com'; // if required
  6. $phpmailer->Password = '12345'; // if required
  7. $phpmailer->SMTPAuth = true; // if required
  8. $phpmailer->SMTPSecure = 'ssl'; // enable if required, 'tls' is another possible value
  9.  
  10. $phpmailer->IsSMTP();
  11.  
  12. }
  13. // This code works fine;
  14. wp_mail("hossein@mydomain.net", "test", "test");
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement