Hello,
like many users, i have some problems in sending e-mails with Mantis BT..
my "Root\mantisbt\config\config_inc.php" has the following configuration, about e-mails:
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.xxxx.yyyy.it';
$g_smtp_connection_mode = '';
$g_smtp_port = 25;
$g_smtp_username = '';
$g_smtp_password = '';
$g_webmaster_email = 'xxxxxx@yyyy.it';
$g_from_email = 'xxxxxx@yyyy.it';
$g_return_path_email = 'xxxxxx@yyyy.it';
$g_from_name= 'Bug Tracking';
I have tried on a php executable, to send e-mails using php mailer:
<?php
require_once ('../Program Files/PHP/v7.0/vendor/phpmailer/phpmailer/PHPMailerAutoload.php');
require_once ('../Program Files/PHP/v7.0/vendor/phpmailer/phpmailer/class.phpmailer.php');
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = "smtp.xxxx.yyyy.it";
$mail->SMTPSecure = false;
$mail->SMTPAuth = false;
$mail->SMTPDebug = 2;
$mail->SetFrom ("xxxxxx@yyyy.it", "Strutture");
$mail->AddReplyTo("xxxxxx@yyyy.it","Strutture");
$mail->Port = 25;
$mail->SMTPAutoTLS = false;
$mail->Subject = "PHPMailer Test Subject via smtp, basic with no authentication";
$mail->Body = "This is SMTP Email Test";
$address = "xxxxxx@yyyy.it";
$mail->AddAddress($address, "Prova");
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
?>
And it works, it send perfectly the e-mail.
Please, i need your help, to understand what i'm missing...
thank you very much,
Davide
p.s.
i have put:
$g_smtp_connection_mode = '';
since email sending on my server works just if i put:
$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;
problems with e-mails
Moderators: Developer, Contributor
problems with e-mails
Mantis: 1.3
PHP: 7.0
IIS 7
SQL: MySQL 5.0.51a
OS: Win Server 2008 R2
PHP: 7.0
IIS 7
SQL: MySQL 5.0.51a
OS: Win Server 2008 R2
Re: problems with e-mails
Might be fixed in 1.3.1 https://www.mantisbt.org/bugs/view.php?id=21293
Re: problems with e-mails
thank you very much! now, with the solution suggested in the link, it works!
Mantis: 1.3
PHP: 7.0
IIS 7
SQL: MySQL 5.0.51a
OS: Win Server 2008 R2
PHP: 7.0
IIS 7
SQL: MySQL 5.0.51a
OS: Win Server 2008 R2