You are not logged in.
Pages: 1
I've stumbled upon another difficulty I can't seem to figure out myself.
I have implemented a few custom lines of php code in a page-template that is supposed to send an email when called.
When just calling the function sendEmail() it results in an error that this function is unknown.
Doing BigTree::sendEmail() goes a step further but breaks again with no email being sent. How do I know it's using my configured Mailgun-account?
Offline
To send mail through Mailgun you need to use the BigTreeEmailService class:
<?php
$service = new BigTreeEmailService;
$service->sendEmail($subject,$html_body,$to,$from_email,$from_name,$reply_to,$plain_text_body);
?>
Offline
Thanks Tim. Works! The only reference to functions is under the "Core" and "BigTreeModule", etc? right? Or is there another document I've been missing?
Sorry for so many questions. I'm not an expert in PHP, but learning with a very steep curve here ?
Offline
You're right, it looks like some of the class documentation isn't in the main site. I'll try to get those missing classes up soon. The main class documentation is here:
https://www.bigtreecms.org/docs/code/
It seems to be a bit outdated and has some things in the wrong category at the moment.
No problem with the questions, happy to help!
Offline
Pages: 1