Page 1 of 1

Could not instantiate mail function.

Posted: 30 Jun 2006, 17:06
by palula
Hi everybody!!!

Everytime I create a user, or update a status on a report, I get this message on a page right after the change:

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

Can anybody help me out? I´m very new to Mantis and very new to PHP and MySQL. I saw there are some configs relative to email settings on the config_defaults_inc.php

Changed some things but it doesn´t work. For now I just returned the configs to it´s defaults to start over again. I know what smtp and sendmail stand for... But I´m not familiar with phpmailer. What would be my best choice?

I work on an enterprise and we have a provider that has an smtp server... Sendmail stands for Linux´s sendmail server right? Here on our network we don´t have linuxboxes so this one wouldn´t help...

Thanks a lot!

Posted: 03 Jul 2006, 16:25
by joemok
Hi,
I have come across the same problem before. Probably you have
already tried but just in case you haven't, you may try:

1. If you are using SMTP, may be you can check if you have properly configured a the SMTP username and password for authentication?

2. Use telnet to check the connectivity for SMTP.

3. Has $g_phpMailer_method been set to 2 (which is the config for using SMTP)?

Cheers.

Posted: 03 Jul 2006, 18:29
by palula
After changing those configs I receive this message:

Testing Mail - PROBLEMS SENDING MAIL TO: adminemail@domain
Mailer Error: SMTP Error: The following recipients failed: adminemail@domain

Have you guys been through this?

Posted: 04 Jul 2006, 04:00
by joemok
Suggested that you may want to find out where you have defined adminemail@domain. It does not seems to be a valid email address
and that is probably why you can't send mail to it.

Posted: 04 Jul 2006, 04:40
by palula
Suggested that you may want to find out where you have defined adminemail@domain. It does not seems to be a valid email address
and that is probably why you can't send mail to it.
adminemail@domain is written here just as an example. The email I'm using on the config, is a working one. I just didn't want to reveal it. :)

Similar...but...different

Posted: 12 Jul 2006, 23:06
by shildebrand
I am having a similar problem, using Mantis 1.0.3 with PHP 4.3.4 on Win2K Server.

I get the same error if I try to use mail(). I get further, but not far enough, if I am using SMTP.

I am authenticating to the server and can easily have Mantis send e-mails to anyone within the current domain, but any attempts to send mail to a user outside of the domain results in this error:

PROBLEMS SENDING MAIL TO: anyemailddr@gmail.com
Mailer Error: SMTP Error: The following recipients failed: anyemailddr@gmail.com


I have not changed $g_limit_email_domain from its default, which I have verified is set to OFF.

I'm suspecting this could be a limitation of our SMTP server here, but my IT support staff hasn't been of much help. (One suggested I ditch Mantis completely!)

Any ideas would be appreciated.

Re: Could not instantiate mail function.

Posted: 13 Jul 2006, 08:46
by Xcert
palula wrote:Hi everybody!!!

Everytime I create a user, or update a status on a report, I get this message on a page right after the change:

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

Can anybody help me out? I´m very new to Mantis and very new to PHP and MySQL. I saw there are some configs relative to email settings on the config_defaults_inc.php

Changed some things but it doesn´t work. For now I just returned the configs to it´s defaults to start over again. I know what smtp and sendmail stand for... But I´m not familiar with phpmailer. What would be my best choice?

I work on an enterprise and we have a provider that has an smtp server... Sendmail stands for Linux´s sendmail server right? Here on our network we don´t have linuxboxes so this one wouldn´t help...

Thanks a lot!
Had the same problem too...try this.

go to ur php directory and look for a file "php.ini"....it may also be in the windows/system32 directory.

when U find it...use a text editor to open it up and do a search for "mail"...it should bring U to a section of php.ini where there is a "SMTP=" line.

change that line to "SMTP=proxyname" where proxyname is the name of ur ISP's server.

Add "Port=25" below

so now U have

SMTP=proxyname
Port=25

Save the changes and exit the file.

try ur mail function again.

hopefully it works for U.

Posted: 04 Aug 2006, 12:10
by saando
I tried to change the setting in the php.ini file for SMTP

SMTP=proxyname
Port=25

but it still doesn't work.

I am using an XAMPP installation. There are 2 .ini files php.ini and php5.ini
I changed both, but same error.

"Mailer Error: Could not instantiate mail function."

:(

Posted: 04 Aug 2006, 13:35
by saando
Ok, i figured i tout on my own.
stupid mistake frmo my side actually :)

Open config_default_inc.php in the mantis installation.
Scroll down to
#############################
# Mantis Email Settings
#############################

There you should see all the parameters. Configure all of it accordingly.

Take note on the $g_phpMailer_method. I use SMTP so my value is set to 2.

Hope this helps the others.
cheers