SMTP Error: Could not authenticate.SMTP

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
treneslgr
Posts: 3
Joined: 09 Feb 2022, 20:45

SMTP Error: Could not authenticate.SMTP

Post by treneslgr »

Hi all, I am having problems with sending using outlook365. When I do some tests using /admin/email_queue.php the first few tests work and then it stops working. I try sending a password reset email and it gets queued and I see it in the mantis_email_table.
In the logs I get the following error

2022-02-09 15:03 -03 MAIL email_api.php:1432 email_send() ERROR: Message could not be sent - SMTP Error: Could not authenticate.SMTP server error: Called RSET without being connected
2022-02-09 15:43 -03 MAIL email_api.php:1432 email_send() ERROR: Message could not be sent - SMTP Error: Could not authenticate.SMTP server error: Called RSET without being connected

This is the configuration in config/config_inc.php
###########################

MantisBT Email Settings
###########################

$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.office365.com';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = '587';
$g_smtp_username = 'mantis@my_domain.com';
$g_smtp_password = 'my_pass';
$g_administrator_email = 'mantis@my_domain.com';
$g_webmaster_email=$g_administrator_email;
$g_return_path_email = 'mantis@my_domain.com';
$g_from_email= 'mantis@my_domain.com';
$g_from_name = 'Soporte';
$g_email_send_using_cronjob = OFF;
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/srv/www/vhosts/my_domain.com/mantisbt.log';

I will be grateful for any help you can give me.

Regards
Attachments
mail.png
mail.png (7.86 KiB) Viewed 3060 times
rajesh.n
Posts: 3
Joined: 14 Feb 2022, 12:00

Re: SMTP Error: Could not authenticate.SMTP

Post by rajesh.n »

Which version of PHP are you using ?
We have same issue and it started from Feb 2nd on words .
We tested it in many staging servers . But it working fine with below packages versions with same mail configuration .

Mantis version : 2.25.2
PHP version : PHP 7.0.33
OS : Ubuntu 16.4

Note : Found only version change in PHP .

Can you confirm it and might be helpful for you .

But always you note that , basic authentication of of Microsoft office 365 Exchange will be closing on 1 Sep 2022 . So You might check the support of Modern authentication in mail notification before it .
Last edited by rajesh.n on 18 Feb 2022, 13:39, edited 2 times in total.
treneslgr
Posts: 3
Joined: 09 Feb 2022, 20:45

Re: SMTP Error: Could not authenticate.SMTP

Post by treneslgr »

Hi rajesh.n, that's exactly what I did. I set up another server (sles 15 sp3) with Apache 2.4 and PHP7 because on the other server I still have the productive with mantisbt in 1.2 . I just entered to comment my solution and I find your answer.
Thank you very much for your help and for the information about the change of authentication that will stop working, I didn't know it. I will look into this issue.

Regards
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: SMTP Error: Could not authenticate.SMTP

Post by mushu »

It will need to be added by a plugin that supports OAuth authentication which Mantis and the current email module does not support. if you are able to find a php OAuth module and plug it into Mantis or the Email plugin, many would be grateful.
Post Reply