Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw fatal error #41

Closed
gorge2004 opened this issue Jul 10, 2017 · 7 comments
Closed

Throw fatal error #41

gorge2004 opened this issue Jul 10, 2017 · 7 comments

Comments

@gorge2004
Copy link

  • bug report? yes
  • feature request? no
  • version: 2.4.2

No work. i am attempting to send a mail but it give me this:
Fatal error: Uncaught Error: Class 'Nette\Mail\Message' not found in C:\xampp\htdocs\Pasantias pdf\Registro\componentes\correo.php:4 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Pasantias pdf\Registro\componentes\correo.php on line 4

my code is the following:
use Nette\Mail\Message;

$mail = new Message;
$mail->setFrom('Jorge ********@gmail.com')
->addTo('@gmail.com')
->setSubject('Order Confirmation')
->setBody("Hello, Your order has been accepted.");
$mailer = new Nette\Mail\SmtpMailer([
'host' => 'smtp.gmail.com',
'username' => '
@gmail.com',
'password' => '
*****',
'secure' => 'ssl',
'context' => [
'ssl' => [
'capath' => '/path/to/my/trusted/ca/folder',
],
],
]);
$mailer->send($mail);

@adaamz
Copy link

adaamz commented Jul 10, 2017

What do you use for autoloading?

@gorge2004
Copy link
Author

At what do you refeer with autoloading?

@adaamz
Copy link

adaamz commented Jul 10, 2017

Because this looks like autoloading problem (class not found...)

@gorge2004
Copy link
Author

I download

@gorge2004 gorge2004 reopened this Jul 10, 2017
@gorge2004
Copy link
Author

I downloaded and uncompressed on my directory project. And i was testing with that code and show me error .

@dg
Copy link
Member

dg commented Jul 10, 2017

It should be installed via composer require nette/mail. It is missing in documentation :-(

@gorge2004
Copy link
Author

ok ok ok , i get it. 👍

@dg dg closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants