Email not getting sent using SMTP

Backend functionalities: user management, course management, reports, certificates, etc.
zaff
Newbie
Posts: 7
Joined: Mon Aug 06, 2018 7:05 pm
Version: forma.lms 2.0

Email not getting sent using SMTP

Post by zaff »

Hi,
Formalms and the SMTP have been working well for some time now (many months), but it stopped working since 18th of June.
Our formalms are hosted in Linode and my SMTP server is with a local hosting provider.

When a user tries the "forgot password" link and puts in the email ID - Formalms keeps working in the background - I have to manually quit it.
I spoke to Linode, they say there are no restrictions on the email ports.

Now here is the interesting part - I tried using my friend's SMTP config (a different hosting provider) and also Gmail SMTP - when I tried the "forgot password" link, what it does is it rightfully finishes the process and tells me that email has been sent for resetting password, but email is not received (happens for both the smtp from my friend).

I spoke to the local service provider. he says there are no changes from his side.

My SMTP details are attached.
Not sure why
1. My SMTP that was working well all this while, suddenly stopped sending email
2. why is my friend smtp working - atleast the screen says the email has been sent (for lost password), but emails are not received.

Could you please help?
Attachments
smtp.jpg
alfa24
Senior Boarder
Posts: 2064
Joined: Fri Nov 24, 2017 8:45 am

Re: Email not getting sent using SMTP

Post by alfa24 »

Hi,
raise smtp_debug to 4 and post the debug log here.
P.S.: don't attach personal info such as user/passwords, even in a screenshot.
Per supporto GRATUITO contattatemi in privato qui
User avatar
mauro.renga
FormaLms User
Posts: 67
Joined: Wed Sep 19, 2018 11:46 am
Version: forma.lms 2.4

Re: Email not getting sent using SMTP

Post by mauro.renga »

Hi, i have a similar problem.

I'm trying to setup SMTP (with Brevo or MailSender).

I followed the provider instructions but when i try to send e-mails from Forma nothing happen.

To alfa24: i tried to setup smtp_debug to 4 but error_log_php file doesn't show what we need.
Mauro Renga

Alpha Consulting Srl
www.alphaconsulting.it
alfa24
Senior Boarder
Posts: 2064
Joined: Fri Nov 24, 2017 8:45 am

Re: Email not getting sent using SMTP

Post by alfa24 »

When you set smtp_debug, PHPMailer won't fire errors, it will echo the info on the page.
Per supporto GRATUITO contattatemi in privato qui
User avatar
mauro.renga
FormaLms User
Posts: 67
Joined: Wed Sep 19, 2018 11:46 am
Version: forma.lms 2.4

Re: Email not getting sent using SMTP

Post by mauro.renga »

Understood. No errors are shown on the page.
Mauro Renga

Alpha Consulting Srl
www.alphaconsulting.it
alfa24
Senior Boarder
Posts: 2064
Joined: Fri Nov 24, 2017 8:45 am

Re: Email not getting sent using SMTP

Post by alfa24 »

I did not mention "errors", but INFO.
You should see verbose mail log.
If you don't see them you should debug directly in the code.
Per supporto GRATUITO contattatemi in privato qui
zaff
Newbie
Posts: 7
Joined: Mon Aug 06, 2018 7:05 pm
Version: forma.lms 2.0

Re: Email not getting sent using SMTP

Post by zaff »

alfa24 wrote: Thu Jun 20, 2024 11:47 am Hi,
raise smtp_debug to 4 and post the debug log here.
P.S.: don't attach personal info such as user/passwords, even in a screenshot.

When I try the original smtp this is the message after raising smtp_debug to 4 [the smtp configuration was provided as a screenshot earlier -sorry about the password ..will change it once I fix this]

2024-06-20 15:27:45 Connection: opening to ssl://firstavocado.com:465, timeout=300, options=array()
2024-06-20 15:29:59 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://firstavocado.com:465 (Connection timed out) [/var/www/html/vendor/phpmailer/phpmailer/src/SMTP.php line 389]
2024-06-20 15:29:59 SMTP ERROR: Failed to connect to server: Connection timed out (110)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting

When I tried my friends smtp (i.e. brevo smtp) I got the following log. Do note, although I do not receive automated lost password emails, the message on the screen says "Thank you! We have sent you an email with the link to reset your password." (which was not the case with my actual smtp)

2024-06-20 15:40:47 Connection: opening to ssl://smtp-relay.brevo.com:587, timeout=300, options=array()
2024-06-20 15:40:47 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:1408F10B:SSL routines:ssl3_get_record:wrong version number [/var/www/html/vendor/phpmailer/phpmailer/src/SMTP.php line 389]
2024-06-20 15:40:47 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/var/www/html/vendor/phpmailer/phpmailer/src/SMTP.php line 389]
2024-06-20 15:40:47 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp-relay.brevo.com:587 (Unknown error) [/var/www/html/vendor/phpmailer/phpmailer/src/SMTP.php line 389]
2024-06-20 15:40:47 SMTP ERROR: Failed to connect to server: (0)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting


Pls help
alfa24
Senior Boarder
Posts: 2064
Joined: Fri Nov 24, 2017 8:45 am

Re: Email not getting sent using SMTP

Post by alfa24 »

Different issues, same cause: SSL connection. Is your instance secured?
Per supporto GRATUITO contattatemi in privato qui
zaff
Newbie
Posts: 7
Joined: Mon Aug 06, 2018 7:05 pm
Version: forma.lms 2.0

Re: Email not getting sent using SMTP

Post by zaff »

alfa24 wrote: Thu Jun 20, 2024 5:21 pm Different issues, same cause: SSL connection. Is your instance secured?
Not sure, what you mean by "secured".. you are speaking to a one less technical.
zaff
Newbie
Posts: 7
Joined: Mon Aug 06, 2018 7:05 pm
Version: forma.lms 2.0

Re: Email not getting sent using SMTP

Post by zaff »

mauro.renga wrote: Thu Jun 20, 2024 2:21 pm Hi, i have a similar problem.

I'm trying to setup SMTP (with Brevo or MailSender).

I followed the provider instructions but when i try to send e-mails from Forma nothing happen.

To alfa24: i tried to setup smtp_debug to 4 but error_log_php file doesn't show what we need.

Change ssl to tls ...it worked for me ... as brevo uses port 587
Post Reply