简体   繁体   中英

getting this error stream_socket_enable_crypto(): Peer certificate CN=`srv112.hostserv.co.za' did not match expected CN=`smtp.office365.com'

I am using sending mail function at laravel:

            Mail::send(
          'mail_send_currentopening', ['data' => $input],
          function($message)use($input, $path){
                  $message->to('tech@idigital.net','To noreply');enter code here
                  $message->subject('Current Openings');
                  $message->from('enquiries@mallsystems.co.za','Resume')`enter code here`;
                  $message->attach($path,array(
                    'as' => "resume", // If you want you can chnage original name to custom name      
                    ));
              }

You should change the information in your SSL certificate, most likely you have smtp.office365.com as the common name (CN) aka full qualified domain name (fqdn) when you should have srv112.hostserv.co.za

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM