Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define( 'SMTP_USER', 'user@example.com' );
- define( 'SMTP_PASS', 'smtp password' );
- define( 'SMTP_HOST', 'smtp.example.com' );
- define( 'SMTP_FROM', 'website@example.com' );
- define( 'SMTP_NAME', 'e.g Website Name' );
- define( 'SMTP_PORT', '25' );
- define( 'SMTP_SECURE', 'tls' );
- define( 'SMTP_AUTH', true );
- define( 'SMTP_DEBUG', 0 );
- add_action( 'phpmailer_init', 'send_smtp_email' );
- function send_smtp_email( $phpmailer ) {
- $phpmailer->isSMTP();
- $phpmailer->Host = SMTP_HOST;
- $phpmailer->SMTPAuth = SMTP_AUTH;
- $phpmailer->Port = SMTP_PORT;
- $phpmailer->Username = SMTP_USER;
- $phpmailer->Password = SMTP_PASS;
- $phpmailer->SMTPSecure = SMTP_SECURE;
- $phpmailer->From = SMTP_FROM;
- $phpmailer->FromName = SMTP_NAME;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement