Created
January 22, 2020 09:30
-
-
Save fiinix/9776e158d12111839f8f4f8928cec95d to your computer and use it in GitHub Desktop.
Add Mailtrap to Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Define CONST values in ENV file | |
*/ | |
function mailtrap($phpmailer) { | |
$phpmailer->isSMTP(); | |
$phpmailer->Host = 'smtp.mailtrap.io'; | |
$phpmailer->SMTPAuth = true; | |
$phpmailer->Port = 2525; | |
$phpmailer->Username = $USERNAMECONST; | |
$phpmailer->Password = $PASSWORDCONST; | |
} | |
add_action('phpmailer_init', 'mailtrap'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment