email not working in Mantisbt but works in php

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
jeffry.ruff@ge.com
Posts: 4
Joined: 12 Mar 2014, 16:30

email not working in Mantisbt but works in php

Post by jeffry.ruff@ge.com »

I need help identifying the issue with email in mantisbt.

First I validate that php email works with the following information in php.ini
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP = localhost
SMTP = x.x.x.x
sendmail_from = 'admin.user@site.com'
;http://php.net/smtp-port
smtp_port = 25

using samplemail.php
using mail($to_add,$subject,$message,$headers)

However the ability to email from Mantisbt with the following fails config_inc.php
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = 'x.x.x.x'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = '????@??.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '??????'; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'admin.user@site.com';
$g_webmaster_email = 'admin.user@site.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'admin.user@site.com'; # the "From: " field in emails
$g_return_path_email = 'admin.user@site.com'; # the return address for bounced mail
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;

http://localhost/mantisbt/admin/test_email.php
Testing Mail - PROBLEMS SENDING MAIL TO: admin.user@site.com. Please check your php/mail server settings.

What am I missing here?
Thanks
Jeff Ruff
atrol
Site Admin
Posts: 8573
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: email not working in Mantisbt but works in php

Post by atrol »

Please use Search before posting and read the Manual
jeffry.ruff@ge.com
Posts: 4
Joined: 12 Mar 2014, 16:30

Re: email not working in Mantisbt but works in php

Post by jeffry.ruff@ge.com »

I have verified all the steps except the loging step. Still fails in Mantis and works in php. I will try using the log and see if it provides addditional information. Thanks for the feedback.
jeffry.ruff@ge.com
Posts: 4
Joined: 12 Mar 2014, 16:30

Re: email not working in Mantisbt but works in php

Post by jeffry.ruff@ge.com »

changed mailer method to MAIL and now all works fine.
Post Reply