Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Cannot send mail with SMTP

  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188361 by Kevin
Cannot send mail with SMTP was created by Kevin
I configured SMTP but I have not been able to send emails.

I got a syntax error in phpmailer 6.0.3 (version with LS 3.17) so I downloaded 6.0.7 and placed it in a different directory.

I changed the paths in load_phpmailer.php

I am using the same information that I use in MS Outlook such as:

smtp.example.com:587
tls
user at example.com


I requested a password from the LS login screen to determine if it works and I only got a message that shows, "Email failed" from line 289 of applications/controllers/admin/authentication.php

Debug mode is 2 in the config.php

I set $mail->SMTPDebug = 4 in PHPMailer.php


I added a path for the error_logs in php.ini and restarted apache but it did not produce a file.


Do you have any idea how I can get the email to work or see debugging information?
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188362 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP
An update.

I created an example php page and got this error in the browser:
Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.example.com:587 (Permission denied)

I was able to send an email from the command line with these commands.

echo -n "\0user@example.com\0j83kc74,%8#ge" | base64
RETURNS: XDB1c2VyQGV4YW1wbGUuY29tXDBqODNrYzc0LCU4I2dl

openssl s_client -starttls smtp -crlf -connect smtp.example.com:587
EHLO there
AUTH PLAIN XDB1c2VyQGV4YW1wbGUuY29tXDBqODNrYzc0LCU4I2dl
MAIL FROM:user@example.com
RCPT TO:another_user@example.com
DATA
This is a Test. Hello World.
.
QUIT
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.
More
4 years 6 months ago #188364 by jelo
Replied by jelo on topic Cannot send mail with SMTP

Kevin wrote: I configured SMTP but I have not been able to send emails.

Can you provide the settings you used inside LimeSurvey? Screenshot or textwise.
What version of LimeSurvey is used?

Kevin wrote: I got a syntax error in phpmailer 6.0.3 (version with LS 3.17) so I downloaded 6.0.7 and placed it in a different directory.

I cannot recommend changing the PHP source without first checking the config with an untouched installation.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188367 by DenisChenu
Replied by DenisChenu on topic Cannot send mail with SMTP

Kevin wrote: I got a syntax error in phpmailer 6.0.3 (version with LS 3.17) so I downloaded 6.0.7 and placed it in a different directory.

Maybe this issue can be reported …

Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.example.com:587 (Permission denied)

The webserver user don't have the right to call external page.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Kevin
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188378 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP

DenisChenu wrote:

Kevin wrote: I got a syntax error in phpmailer 6.0.3 (version with LS 3.17) so I downloaded 6.0.7 and placed it in a different directory.

Maybe this issue can be reported …


I think you are correct.

Error in debug mode: github.com/PHPMailer/PHPMailer/issues/1572filter_var() : explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago #188379 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago - 4 years 6 months ago #188381 by DenisChenu
Replied by DenisChenu on topic Cannot send mail with SMTP

Kevin wrote:

DenisChenu wrote:

Kevin wrote: I got a syntax error in phpmailer 6.0.3 (version with LS 3.17) so I downloaded 6.0.7 and placed it in a different directory.

Maybe this issue can be reported …


I think you are correct.

Error in debug mode: github.com/PHPMailer/PHPMailer/issues/1572filter_var() : explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated

Good, fixed in vendor :)

But i talk for LimeSurvey : www.limesurvey.org/community/bug-tracker

[Edit] : already on phpMailer 6.0.7 github.com/LimeSurvey/LimeSurvey/commit/...e82c9091681631dc830c

Ypou can update whole LimeSurvey not only phpMailer

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 6 months ago by DenisChenu. Reason: Edit
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago #188382 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP
I am using imap.startlogic.com:587 with grafana and it works.

I changed the bounce settings in LS to the same as grafana but it did not make a difference... but I assume bounce is not for sending email.
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188383 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP

DenisChenu wrote: You can update whole LimeSurvey not only phpMailer


Ok thanks.
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188384 by DenisChenu
Replied by DenisChenu on topic Cannot send mail with SMTP
Last version of LimeSurvey is up to date with phpMailer : github.com/LimeSurvey/LimeSurvey/commit/...e82c9091681631dc830c

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Kevin
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188385 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP
Thanks. I think I am using 3.17.3.
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.
  • Kevin
  • Kevin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 6 months ago - 4 years 6 months ago #188400 by Kevin
Replied by Kevin on topic Cannot send mail with SMTP
I uncommented if(!$sent) var_dump($maildebug); in application/helpers/common_helper.php

I got this message! This will be a huge help!
Code:
2019-09-02 19:53:13 SMTP INBOUND: &amp;quot;535 Incorrect authentication data&amp;quot;<br>
2019-09-02 19:53:13 SERVER -&amp;gt; CLIENT: 535 Incorrect authentication data<br>
2019-09-02 19:53:13 SMTP ERROR: Password command failed: 535 Incorrect authentication data<br>
SMTP Error: Could not authenticate.<br>
2019-09-02 19:53:13 CLIENT -&amp;gt; SERVER: QUIT<br>


UPDATE: I added example.com for a screenshot and forgot to put the real domain back in the box.

I think the problem might be with Selinux.

More comments here: stackoverflow.com/questions/57751445/per...iler-smtp-limesurvey
Last edit: 4 years 6 months ago by Kevin.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose