View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0032956||mantisbt||public||2023-09-23 06:13||2023-10-06 06:52|
|Status||closed||Resolution||no change required|
|Summary||0032956: Sending mails via SMTP/PHPMailer seems to always default to CRAM-MD5 password|
I was trying to configure mantisbt to send mail nofitications, using this configuration:
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
It didn't works, and checking my SMTP server logs, I found that it was trying to authenticate using CRAM-MD5, whereas using plain text password was the intended.
After diving a bit into MaintsBT, I found that $t_mail->AuthType (property of PHPMailer class) is never set, and seems to default to CRAM-MD5. So I solved my problem by hardcoding a new line in core/email_api.php between lines 1310 and 1311:
$t_mail->AuthType = 'PLAIN';
It worked like a charm, and I started receiving emails.
Maybe I have missed some code where the AuthType is handled, but in case I haven't, a new parameter to handle this should be implemented to make sending mail feature compatible with SMTP servers that does not support CRAM-MD5.
|Steps To Reproduce|
|Tags||No tags attached.|
Are you able to reproduce with latest stable MantisBT version (2.25.7 at the moment)?
Updated and working without any code change. Thanks!