php - How to send email in laravel -
i have tried this.
<?php return array( 'driver' => 'smtp', 'host' => 'smtp.sendgrid.net', 'port' => 587, 'from' => array('address' => 'from@example.com', 'name' => 'john smith'), 'encryption' => 'tls', 'username' => 'sendgrid_username', 'password' => 'sendgrid_password', ); mail::send('emails.demo', $data, function($message) { $message->to('jane@example.com', 'jane doe')->subject('this demo!'); });
but getting error:
failed authenticate on smtp server username "sendgrid_username" using 2 possible authenticators
how resolve problem.
please me.
make sure settings ok, username , password correct, function should work posted.
Comments
Post a Comment