Send Email with SMTP port 25 no SSL or TLS
Posted: 15 Jul 2024, 16:12
Hi!
i'm in trouble to looking for why mails are not send by Mantis.
I tried to send email with a simple php file like this:
And it's working...
So in mantis i replicated the configuration... and this are log
As i said with test code in upper page i can send email without problems... with mantis i still get Could not authenticate..
Any suggestions?
Thx!
i'm in trouble to looking for why mails are not send by Mantis.
I tried to send email with a simple php file like this:
Code: Select all
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php'; // Adjust based on your installation method
$mail = new PHPMailer(true); // Enable exceptions
// SMTP Configuration
$mail->isSMTP();
$mail->Host = 'smtp.mysmtp.com'; // Your SMTP server
$mail->SMTPAuth = true;
$mail->Username = 'username'; // Your Mailtrap username
$mail->Password = 'password'; // Your Mailtrap password
$mail->SMTPSecure = '';
$mail->Port = 25;
// Sender and recipient settings
$mail->setFrom('from@domain.com', 'From Name');
$mail->addAddress('to@domain.com', 'Recipient Name');
// Sending plain text email
$mail->isHTML(false); // Set email format to plain text
$mail->Subject = 'Your Subject Here';
$mail->Body = 'This is the plain text message body';
// Send the email
if(!$mail->send()){
echo 'Message could not be sent. Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
So in mantis i replicated the configuration... and this are log
Code: Select all
2024-07-15 17:51 CEST MAIL email_api.php:1244 email_bug_status_changed() Issue #5 status changed
2024-07-15 17:51 CEST RECIPIENT email_api.php:302 email_collect_recipients() Issue = #5, add @U2 (reporter)
2024-07-15 17:51 CEST RECIPIENT email_api.php:312 email_collect_recipients() Issue = #5, add @U2 (handler)
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:751 email_generic_to_recipients() Issue = #5, Type = new, Msg = 'email_notification_title_for_status_bug_new', User = @U2, Email = 'to@domain.com'.
2024-07-15 17:51 CEST MAIL_VERBOSE email_queue_api.php:129 email_queue_add() message 63 queued
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:2287 email_shutdown_function() Shutdown function called for /bug_update.php
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1340 email_send_all() Processing e-mail queue (1 messages)
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1351 email_send_all() Sending message 63
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1444 email_send() password
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1445 email_send() username
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1451 email_send() SMTPAutoTLS: false
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1453 email_send() SMTPAuth: true
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1458 email_send() 25
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1491 email_send() smtp.mysmtp.com
2024-07-15 17:51 CEST MAIL_VERBOSE email_api.php:1492 email_send() from@domain.com
2024-07-15 17:51 CEST MAIL_VERBOSE email_queue_api.php:192 email_queue_delete() message 63 deleted from queue
2024-07-15 17:51 CEST MAIL email_api.php:1573 email_send() ERROR: Message could not be sent - SMTP Error: Could not authenticate.
Any suggestions?
Thx!