Support » Plugin: WP Mail SMTP by WPForms » SSL operation failed with code 1

  • Resolved Christian Gatti


    Hi guys,
    test email log says: string(43) “SMTP Error: Could not connect to SMTP host.” and I got this error on my apache log:

    PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/vhosts/ on line 368\n', referer:

    These are my settings (doublechecked and perfectly working with my mail client):
    from email:
    SMTP host:
    SMTP Port: 25
    “No encryption” selected
    “Yes: Use SMTP authentication” selected, with theese settings: username and password xxxxxxxxxxxx

    I’ve googled a while and I’ve found this suggestion, wich does NOT solve my problem:

    function my_wp_mail_smtp_custom_options($phpmailer) {
    	$phpmailer->SMTPOptions = array(
    		'ssl' => array(
    			'verify_peer' => false,
    			'verify_peer_name' => false,
    			'allow_self_signed' => true
    	return $phpmailer;

    My server runs PHP 7.1.6 and mounts a COMODO SSL Certificate.
    Any idea on what to investigate?

    Thanks in advance,

    I found that by changing “SMTPAutoTLS = true” to “SMTPAutoTLS = false” into class-phpmailer.php solves the problem, but I guess it is not the correct way to proceed. Any advice?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SSL operation failed with code 1’ is closed to new replies.