Not particularly fancy with processwire(coming from Node and React), but am helping someone fix up their e-commerce site. Everything has been quite enjoyable except for the issue I am having with setting up a cron job on my server and trying to send mail. Don't worry, the cron job executes just fine, I just get this error each time in the logs,
PHP Fatal error: Call to undefined function wireMail().
Here is my test php script in all it's glory,
`<?php
$subject = 'This is a great subject';
$message = 'Hello Dan, how are you doing this evening?';
$mail = wireMail();
$mail->to('myemailaddress@gmail.com');
$mail->from(wire('config')->scFromEmail);
$mail->subject($subject);
$mail->bodyHTML($message);
$mail->send();
?>`
This php script sits inside processwire itself. I am used to having to import modules into the head of my files, but it looks like other pages on the existing site don't "include" anything related to wireMail, and they work just fine.
I must be missing something, any help? Site is running processwire 2.6.1
Not particularly fancy with processwire(coming from Node and React), but am helping someone fix up their e-commerce site. Everything has been quite enjoyable except for the issue I am having with setting up a cron job on my server and trying to send mail. Don't worry, the cron job executes just fine, I just get this error each time in the logs,
PHP Fatal error: Call to undefined function wireMail().
Here is my test php script in all it's glory,
`<?php
?>`
This php script sits inside processwire itself. I am used to having to import modules into the head of my files, but it looks like other pages on the existing site don't "include" anything related to wireMail, and they work just fine.
I must be missing something, any help? Site is running processwire 2.6.1