Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'phpmailer_init', 'wpse8170_phpmailer_init' );
- function wpse8170_phpmailer_init( PHPMailer $phpmailer ) {
- $phpmailer->Host = 'godadysmtpsampledomain.secureserver.net';
- $phpmailer->Port = 465; // could be different
- $phpmailer->Username = 'sender@mysite.com'; // if required
- $phpmailer->Password = '12345'; // if required
- $phpmailer->SMTPAuth = true; // if required
- $phpmailer->SMTPSecure = 'ssl'; // enable if required, 'tls' is another possible value
- $phpmailer->IsSMTP();
- }
- // This code works fine;
- wp_mail("hossein@mydomain.net", "test", "test");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement