Problem with PhpMailer in v0.19.2

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Vramin
Posts: 2
Joined: 17 Feb 2005, 12:08

Problem with PhpMailer in v0.19.2

Post by Vramin »

I had run into a problem with Mantis throwing warnings on the screen because of an apparently missing language file (where it went I have no clue). I took a look and saw the newer release (we were running v0.19.0), so I went ahead and upgraded. This solved the language problem, but now when I try to send mail (I need to reset a user's password even as we speak), I get this message:

PROBLEMS SENDING MAIL TO:
Mailer Error: Could not instantiate mail function.

I have found this bug in the bug tracker, but there has been no activity on it lately, except for more people wondering how to get around it.

I have spent about half the day today and a chunk of last night trying to figure out what is going wrong. The only way I can get it to send is if I exclude the parameters "-oi -f" from the request, but of course this goes through without a "From" name, which my mailer doesn't like (Exim).

I'm posting here in hopes that someone has found a solution to this but just hasn't updated the bug yet.

----

Some time later...

I wanted to log onto the Mantis bug tracker and add a note about why the error message doesn't show the recipient address. I registered, but got the same error message when I submitted my registration. The good news is that the email did come. It appears there is a bona fide bug in reporting the error since it happens on the "real" Mantis bug tracker.

The reason the message doesn't show the email address that it fails with is because the variable $t_recipient gets reused and left empty when processing the list to add recipients. If you use $p_recipient in the error message you will at least see the address of whoever did not get the mail.

I think that my MX record for my server might be the problem (waiting for an update to propagate).
ZyanKLee

Post by ZyanKLee »

I got the same error, but I don't think that this has anything to do with the MX entry.

All other pages on my server are doing fine with sending emails and even large newsletters. this seem's to be a problem within Mantisbt v0.19.2
Vramin
Posts: 2
Joined: 17 Feb 2005, 12:08

Post by Vramin »

I actually got mine solved... the bug is listed here: http://bugs.mantisbt.org/view.php?id=4132

The problem on my machine turned out to be this:

I did not realize (probably missed it in the upgrade docs) that Mantis was no longer reading its config overrides from /etc/mantis. I kept changing settings there, but nothing was really changing.

When I set the right mail mode and mail host in /usr/share/mantis/config_inc.php email began flowing out again.
Guest

Post by Guest »

I had some trouble mailing as well. I got various error messages related to SMTP when using 'method 2'. In the end, I had to increase the timout value in phpMailer (defaults to 10 seconds, which isn't a lot) since the SMTP server we use is sometimes a bit slow.

so now I use (in config.php):

Code: Select all

$g_phpMailer_method = 2;
$g_smtp_host = 'our_smtp_server_name_here';
# no authentication needed for smtp for us
This worked only in few cases, but updating class.phpmailer.php with

Code: Select all

var $Timeout = 60;
instead of

Code: Select all

var $Timeout = 10;
seems to have solved most problems.

Hope this will help some poor soul searching the forums for a similar problem :)
Post Reply