phpmailer_init action not called in wordpress

Question

In my plugin phpmailer_init action not called in wordpress. So i can’t sent email from wordpress plugin.

add_action(‘phpmailer_init’, ’email_settings’);

function email_settings( $phpmailer ) {
    U::Log("email settings");
    $phpmailer->isSMTP();
    $phpmailer->Host       = 'mail.littlehandsonline.com';
    $phpmailer->SMTPAuth   = true;
    $phpmailer->Port       = 465;
    $phpmailer->SMTPSecure = 'ssl';
    $phpmailer->Username   = 'email@littlehandsonline.com';
    $phpmailer->Password   = '&syi5;IOGqLB';
    $phpmailer->From       = 'email@littlehandsonline.com';
    $phpmailer->FromName   = 'Little Hands Online';
}

Mailer Error: Invalid address: (From): wordpress@localhost received

0
, Riskhan 6 months 2020-08-29T11:10:39-05:00 0 Answers 70 views 1

Leave an answer