PHPMailer script or any CMS that uses it in Plesk can not sent messages

Follow

Comments

1 comment

  • Avatar
    Phil Glau

    This answer needs far more explanation. 

    The issue is that connecting with PHPMailer from a Let's Encrypt hosted domain (MyHostedDomain.com) ends up seeming to conflict with the certificate from the server's overall Let's Encrypt certificate (MyServer.com). 

    In the script, 

    $pm->Host = 'MyHostedDomain.com' // that has a correct Let's Encrypt cert.
    $pm->IsSMTP();
    // more settings omitted here //
    $pm->Send();

    end's up getting routed to 'MyServer.com' and throwing the certificate conflict.  Saying, unsurprisingly, that 'MyHostdDomain.com' doesn't match 'MyServer.com'. 

    If there's some way that hosted domains are supposed to connect to a Plesk SMTP mail system, specific details should be included in the answer. In fact since this question is about PHPMailer, the answer should ideally show PHPMailer code example (as it's the most widely used PHP mailing package.)

    The only way I've been able to connect is to overwrite the SSL options using:

    $pm->SMTPOptions = array(
    'ssl' => array(
    'verify_peer' => false,
    'verify_peer_name' => false,
    'allow_self_signed' => true
    );

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request