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

  • Resolved Christian Gatti

    (@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/xxxxxxxxxxxx.it/httpdocs/wp-includes/class-smtp.php on line 368\n', referer: https://xxxxxxxxxxxx.it/xxxxxxxxxxxx/wp-admin/options-general.php?page=wp-mail-smtp%2Fwp_mail_smtp.php

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

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

    add_filter('wp_mail_smtp_custom_options','my_wp_mail_smtp_custom_options');
    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,
    Christian

    –update–
    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.