Using SMTP Function instead of Plugin (functions.php)
While this works just fine, I am concerned that it poses a security threat. Does it?
add_action( 'phpmailer_init', 'send_email_using_smtp' );
function bsend_email_using_smtp( $phpmailer ) {
$phpmailer-isSMTP();
$phpmailer-Host = 'mail.example.com';
$phpmailer-SMTPAuth = true;
$phpmailer-Port = 465;
$phpmailer-Username = '[email protected]';
$phpmailer-Password = 'your-email-account-password';
$phpmailer-SMTPSecure = 'ssl';
$phpmailer-From = '[email protected]';
$phpmailer-FromName = 'Your company name';
}