View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
12078Bug reportsInstallationpublic2017-02-21 12:00
Reporterfvanderstarre Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary12078: PHP Error[2]: stream_socket_enable_crypto(): SSL operation failed with code 1 in phpmailer
Description

After installing 2.6.3 lts build 170112 an error occurs when trying to send reminder/invitation emails.
Error message: "PHP Error[2]: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
in file /data/websites/limesurvey-test/html/cru/application/third_party/phpmailer/class.smtp.php at line 369
#0 /data/websites/limesurvey-test/html/cru/application/third_party/phpmailer/class.smtp.php(369): stream_socket_enable_crypto()
#"

Steps To Reproduce

Send invitation or reminder email from token table.

Additional Information

In global settings, email method is set to SMTP.
Works fine in 2.6.2 lts build 161206.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)2.6.3 lts build 170112
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionMS SQL server 2008 R2
Server OS (if known)DB server: Windows NT 6.1 <X64> build 7601 SP1
Webserver software & version (if known)Linux RHEL 7, Apache 2.4.6
PHP Version5.6.30

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2017-01-24 14:08

administrator   ~42819

The emailing security has been raised in the latest version.
This error happens because your mail server uses an invalid certificate.

fvanderstarre

fvanderstarre

2017-01-24 14:20

reporter   ~42820

yes, I just noticed I had to change the SMTP server name. Please close the issue, thanks.

fvanderstarre

fvanderstarre

2017-01-27 09:33

reporter   ~42842

On the same server I have installed L.S. 2.59.1+ build 170116. This version is using phpmailer 5.6.22. This works fine, using the same smtp server.
I have tried copying phpmailer 5.6.22 files into the 2.6.3 installation (which uses version 5.6.21) but that didn't work.
So - is there a difference between versions 2.59 and 2.6.3 with respect to the way phpmailer is called?

fvanderstarre

fvanderstarre

2017-01-31 14:53

reporter   ~42909

It seems I can fix it by replacing lines 3992-3994 in common_helper.php:
require_once(APPPATH.'/third_party/phpmailer/class.phpmailer.php');
require_once(APPPATH.'/third_party/phpmailer/class.smtp.php');
$mail = new PHPMailer;
by:
require_once(APPPATH.'/third_party/phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->SMTPAutoTLS=false;

as taken from the 2.59.1 source files.

c_schmitz

c_schmitz

2017-01-31 15:38

administrator   ~42913

@fvanderstarre: Thank you for the insight. Will apply that as fix.

c_schmitz

c_schmitz

2017-01-31 16:07

administrator   ~42914

Fix committed to 2.06lts branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=22221

Related Changesets

LimeSurvey: 2.06lts bab8d8a9

2017-01-31 15:51:57

c_schmitz

Details Diff
Fixed issue 12078: Email sending problems with unvalidated SSL certificates Affected Issues
12078
mod - application/helpers/common_helper.php Diff File
rm - application/third_party/phpmailer/.gitattributes Diff File
rm - application/third_party/phpmailer/.gitignore Diff File
rm - application/third_party/phpmailer/.scrutinizer.yml Diff File
rm - application/third_party/phpmailer/.travis.yml Diff File
rm - application/third_party/phpmailer/README.md Diff File
rm - application/third_party/phpmailer/SECURITY.md Diff File
mod - application/third_party/phpmailer/VERSION Diff File
rm - application/third_party/phpmailer/changelog.md Diff File
mod - application/third_party/phpmailer/class.phpmailer.php Diff File
mod - application/third_party/phpmailer/class.pop3.php Diff File
mod - application/third_party/phpmailer/class.smtp.php Diff File
mod - application/third_party/phpmailer/extras/htmlfilter.php Diff File
rm - application/third_party/phpmailer/travis.phpunit.xml.dist Diff File

Issue History

Date Modified Username Field Change
2017-01-24 13:43 fvanderstarre New Issue
2017-01-24 14:08 c_schmitz Assigned To => c_schmitz
2017-01-24 14:08 c_schmitz Status new => feedback
2017-01-24 14:08 c_schmitz Note Added: 42819
2017-01-24 14:20 fvanderstarre Note Added: 42820
2017-01-24 14:20 fvanderstarre Status feedback => assigned
2017-01-24 14:21 c_schmitz Status assigned => closed
2017-01-24 14:21 c_schmitz Resolution open => no change required
2017-01-27 09:33 fvanderstarre Status closed => feedback
2017-01-27 09:33 fvanderstarre Resolution no change required => reopened
2017-01-27 09:33 fvanderstarre Note Added: 42842
2017-01-31 14:53 fvanderstarre Note Added: 42909
2017-01-31 14:53 fvanderstarre Status feedback => assigned
2017-01-31 15:38 c_schmitz Note Added: 42913
2017-01-31 16:07 c_schmitz Changeset attached => LimeSurvey 2.06lts bab8d8a9
2017-01-31 16:07 c_schmitz Note Added: 42914
2017-01-31 16:08 c_schmitz Status assigned => resolved
2017-01-31 16:08 c_schmitz Resolution reopened => fixed
2017-01-31 16:08 c_schmitz Fixed in Version => 2.06+
2017-02-21 12:00 c_schmitz Status resolved => closed