All I need from my server is to be able to send emails to my users when they forget their password. I try the code below after installing the Google App Engine SDK for PHP and it gives me the error
Fatal error: require_once(): Failed opening required 'google/appengine/api/mail/Message.php' (include_path='.:') in /Library/WebServer/Documents/AppEngine/testMail.php on line 2
This is my code:
require_once 'google/appengine/api/mail/Message.php';
use google\appengine\api\mail\Message;
try {
$message = new Message();
$message->setSender('[email protected]');
$message->addTo('[email protected]');
$message->setSubject('Example email');
$message->setTextBody('Hello, world!');
$message->send();
echo 'Mail Sent';
} catch (InvalidArgumentException $e) {
echo 'There was an error';
}
I'm thinking that I did not install the engine properly but I'm lost at this point. Any ideas?