Having Incomprehensible problems with Nette/Mail/Message Please help
- desupink
- Member | 4
I am trying to set up Messaging so I can do some tests with “user registration” and “forgot password” but I'm getting an error I can't understand, ALSO for some reason Google is not my friend today.
I'm using PHP&MySQL for the fun stuff and will be using Apache when this all goes live.
I am currently using XAMPP for my environment on a Windows 10 PC
Now for the error ..
Fatal error: Uncaught Error: Class 'Nette\Mail\Message' not found in C:\xampp\htdocs\((project))\((file)).php:66 Stack trace: #0 {main} thrown in C:\xampp\htdocs\((project))\((file)).php on line 66
No idea why this is happening (from what I can tell it can't find the class?) ..
Yet at the top of the file along with all my other includes and require's I have:
use Nette\Mail\Message;
And this is the block of code I am trying to execute
$mail = new Message;
$mail->setFrom('<dummy@email.com>')
->addTo($makeEmails)
->setSubject($sub)
->setBody($body);
$mailer = new Nette\Mail\SmtpMailer([
'host' => 'smtp.gmail.com',
'username' => '((my gmail addy))',
'password' => '((password))',
'secure' => 'ssl',
'context' => [
'ssl' => [
'capath' => '/path/to/my/trusted/ca/folder', //I left this as is and pretty sure it isn't causing the error
],
],
]);
$mailer->send($mail);
Any ideas ?
I'm desperate
- Ondřej Kubíček
- Member | 494
How are you loading the class Message ? standard way through the composer ?