hello
I am working on my joomla 3.5 site, when I use the registration forum i get the following errors .
Notice
Could not instantiate mail function.
×
Warning
An error was encountered while sending activation notification email
when registering a new user. The funny thing is that I am getting the activation email and able to activate the account through the email but I keep getting these errors.
also when I try to use sendmail I can send a test email but still get errors during registration. Tried smtp as well but was unable to send test mails through my provider.
Since im getting the activation email through phpmailer i know it is working again just keep getting the above errors.
Any Ideas to what is going on ?
thanks
dcaldessa
Could not instantiate mail function error
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri May 06, 2016 4:06 pm
-
- Joomla! Virtuoso
- Posts: 4025
- Joined: Mon Nov 25, 2013 4:35 pm
- Location: Montreal, Canada
- Contact:
Re: Could not instantiate mail function error
The fact that the email is sent is very odd - since the above means that the mailPassthru returned false (and in turn, the mail function returned false).
The way we would debug this issue is the following: We open the file libraries/vendor/phpmailer/phpmailer/class.phpmailer.php . In the function "mailPassthru", we remove the @ sign in front of the mail function and then test the functionality. We should then probably see what the issue is.
The way we would debug this issue is the following: We open the file libraries/vendor/phpmailer/phpmailer/class.phpmailer.php . In the function "mailPassthru", we remove the @ sign in front of the mail function and then test the functionality. We should then probably see what the issue is.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter
https://twitter.com/itoctopus - Follow us on Twitter
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri May 06, 2016 4:06 pm
Re: Could not instantiate mail function error
I tried doing as you stated above.
private function mailPassthru($to, $subject, $body, $header, $params)
{
//Check overloading of mail function to avoid double-encoding
if (ini_get('mbstring.func_overload') & 1) {
$subject = $this->secureHeader($subject);
} else {
$subject = $this->encodeHeader($this->secureHeader($subject));
}
if (ini_get('safe_mode') || !($this->UseSendmailOptions)) {
$result = mail($to, $subject, $body, $header);
} else {
$result = mail($to, $subject, $body, $header, $params);
}
return $result;
}
I believe it is just like this removing the @ sign in front of both mail functions. I tested the registration again and still got the same result.
The user is registered and the email is sent for activation but still get the same errors above the registration form.
any other tips would be appreciated
thanks
dcaldessa
private function mailPassthru($to, $subject, $body, $header, $params)
{
//Check overloading of mail function to avoid double-encoding
if (ini_get('mbstring.func_overload') & 1) {
$subject = $this->secureHeader($subject);
} else {
$subject = $this->encodeHeader($this->secureHeader($subject));
}
if (ini_get('safe_mode') || !($this->UseSendmailOptions)) {
$result = mail($to, $subject, $body, $header);
} else {
$result = mail($to, $subject, $body, $header, $params);
}
return $result;
}
I believe it is just like this removing the @ sign in front of both mail functions. I tested the registration again and still got the same result.
The user is registered and the email is sent for activation but still get the same errors above the registration form.
any other tips would be appreciated
thanks
dcaldessa
-
- Joomla! Virtuoso
- Posts: 4025
- Joined: Mon Nov 25, 2013 4:35 pm
- Location: Montreal, Canada
- Contact:
Re: Could not instantiate mail function error
Before " return $result;" can you add the following 4 lines:
And post here what you see there? (Note: please revert back the changes immediately to the original file once you are finished debugging).
Code: Select all
echo('----printing $result ---<br />');
var_dump($result);
echo('----end printing $result ---<br />');
die();
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter
https://twitter.com/itoctopus - Follow us on Twitter
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri May 06, 2016 4:06 pm
Re: Could not instantiate mail function error
itoctopus
I did the above instructions and the result was this
----printing $result ---
bool(true) ----end printing $result ---
whats next ?
thanks
dcaldessa.
I did the above instructions and the result was this
----printing $result ---
bool(true) ----end printing $result ---
whats next ?
thanks
dcaldessa.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri May 06, 2016 4:06 pm
Re: Could not instantiate mail function error
I could not figure out what was going on so i just reinstalled joomla now issue is resolved
thanks for your help
dcaldessa
thanks for your help
dcaldessa