Phoca cart - Could not start mail function.

Phoca Cart - complex e-commerce extension
srajca
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2019, 15:56

Phoca cart - Could not start mail function.

Post by srajca »

Hello,

I have a store set up with Phoca cart on a live server. The problem I cannot solve is the sending of emails when order is created. I have searched everywhere, but cannot figure it out. The emails are not sent and upon order creating I get the error - could not start mail function.
I have tested both PHPMail and SMTP and a send test email function in Joomla works ok, but when sending from Phoca it does not.
Any ideas?

Thank you,
Davor
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca cart - Could not start mail function.

Post by Jan »

Hi, can you paste the screenshot of the error? Can you enable php error reporting and debug mode in Joomla! Global Configuration to get more detailed information about the error?

Jan
If you find Phoca extensions useful, please support the project
srajca
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2019, 15:56

Re: Phoca cart - Could not start mail function.

Post by srajca »

I have enabled the debugging and set it to development. No debugging errors are thrown. Here is the screenshot.
Thank you

.../images/error-mail.png
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca cart - Could not start mail function.

Post by Jan »

Hi, I get error when visiting your site:
Image

Can you upload the screenshot to imgur and paste it here per imgur shortcut?

Jan
If you find Phoca extensions useful, please support the project
srajca
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2019, 15:56

Re: Phoca cart - Could not start mail function.

Post by srajca »

Hello,

yes the error is for the old website, waiting now that the antiviruses will acknowledge the clean site. Anyways here is the link - https://imgur.com/8KrHyJw
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca cart - Could not start mail function.

Post by Jan »

"Could not start mail function" is a Joomla! system (email class) error message, there is no such message in Phoca Cart. Phoca Cart just ask to send the email by the Joomla! system function (and Joomla! ask the mailer class) ...

Are you able to set another setting for the mail function, like smtp, etc. :idea:

Jan
If you find Phoca extensions useful, please support the project
srajca
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2019, 15:56

Re: Phoca cart - Could not start mail function.

Post by srajca »

I have tried both SMTP and PHP and if I do a test email, it gets sent. Any other ideas?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca cart - Could not start mail function.

Post by Jan »

Hi, hmmm, hard to say, when there is no error message including file and line where the problem can occur. Did you even try to take a look at it on your server phpErrorLog?

"Could not start mail function." (PHPMAILER_INSTANTIATE) is a Joomla! error message which can be found in:

libraries\src\Mail\language\phpmailer.lang-en_gb.php and is alias for php mailer string: $PHPMAILER_LANG['instantiate'] which can be found in Joomla! (PHP Mailer) library:

libraries\vendor\phpmailer\phpmailer\class.phpmailer.php

in function

Code: Select all

protected function mailSend($header, $body) 
on line cca 1490.

Are you sure, your SMTP settings are correctly saved. Because when using SMTP, you maybe should not get error from PHP Mailer class. But really hard to say, this is much more a question on Joomla! Core Developers and most on PHP Mailer Developers :idea:

In every case, it just does not get the result from sending email on your server:

Code: Select all

if (!$result) {
            throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL);
        }
Unfortunately, the problem occurs outside Phoca Cart - in Joomla! in PHP Mailer library, so really hard to give some clue advice here. Maybe some error log on server (PHP Error) or mail server (Webosting provider must be asked) can say more :idea:


Jan
If you find Phoca extensions useful, please support the project
Post Reply