Page 1 of 1

Phoca Download V3 Alpha Error when sending email on download

Posted: 15 Feb 2013, 07:52
by JTCrimmel
Fatal error: Call to undefined method JUtility::sendMail() in {SITEROOT}/administrator/components/com_phocadownload/libraries/phocadownload/mail/mail.php on line 77
I see the above error when the option to send email after a file has been downloaded is active. After disabling this option the error is not shown. All mail settings in Joomla Global Config are correct.


Thanks, Jason

Re: Phoca Download V3 Alpha Error when sending email on down

Posted: 15 Feb 2013, 21:41
by svenf01
Hi,
Here a solution to get it working:

Delete the Line:
JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message);

Add instad:
$mail = JFactory::getMailer();
$mail->setSender($mailfrom);
$mail->setBody($message);
$mail->setSubject($subject);
$mail->addRecipient($email);
$mail->send();

With this Change it is working.
Greatings
Sven

Re: Phoca Download V3 Alpha Error when sending email on down

Posted: 16 Feb 2013, 06:38
by JTCrimmel
Thanks Sven.

Re: Phoca Download V3 Alpha Error when sending email on down

Posted: 18 Feb 2013, 22:05
by Jan
Hi, thank you for the info, will be set in Beta.

Thank you, Jan

Re: Phoca Download V3 Alpha Error when sending email on down

Posted: 15 Mar 2013, 15:17
by paulo.simas
Hey Fellas,

I solved this another way:

$mail = JMail::getInstance();
$mail->sendMail($mailfrom, $fromname, $email, $subject, $message);

Re: Phoca Download V3 Alpha Error when sending email on down

Posted: 22 Mar 2013, 19:50
by Jan
Hi, changed in Beta.

Jan