- Posts: 3856
- Thank you received: 515
- Fox Contact Form
- Error Message Could not instantiate mail function
Error Message Could not instantiate mail function
- Demis [Fox-Labs]
- Topic Author
See "Common solution with some Internet Service Providers" at the bottom
This error is raised by phpmailer software (see call stack below), and it means that php mail() function on your server has failed.
There is no way to know why, other then seeing in the system log (accessible only to system administrator). On Linux, this is usually /var/log/messages or /var/log/syslog.
Apache doesn't log such errors, because it doesn't know the meaning of the /usr/sbin/sendmail numeric return codes, and Postfix doesn't log it in /var/log/mail.log because the email never arrives to the MTA .
Change the "Mailer" option in your Joomla Mail configuration to "Sendmail" or "SMTP", and hope that a different error doesn't appear.
Go to Joomla "Site" -> "Global configuration" -> "Server" tab -> "Mail Settings" section -> "Mailer" field. Change the value "PHP Mail" with "Sendmail" or "SMTP".
Doing the operation explained above, you are about to change the call stack from the standard value:
"Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "php mail() function"
"Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "sendmail program"
"Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "SMTP TCP socket"
On windows wamp / xampp local environments, php mail() function never works after a standard installation, until you don't set properly the following values in php.ini, and then restart apache service.
[mail function] SMTP = put your SMTP server here smtp_port = 25 sendmail_from = firstname.lastname@example.org
If you are not able to fix Apache settings, configure Joomla to use SMTP server, but fill-out the other server data. Copy the SMTP server data from your email client. It should work.
Common solution for this error with some Internet Service Providers
Host Europe (hosteurope.de)
SMTP Authentication: yes
SMTP Security: none
SMTP Port: 25
SMTP Username: created by yourself in your control panel
SMTP Password: assigned by yourself in your control panel
SMTP Host: localhost
If you find a solution for your own provider, please tell me for inclusion. Open another thread on this forum.