mardi 20 décembre 2016

Sending mail laravel 5 how to get the errors

.env

MAIL_DRIVER=smtp
MAIL_HOST=box656.bluehost.com
MAIL_PORT=465
MAIL_USERNAME=email@something.com
MAIL_PASSWORD=*****
MAIL_ENCRYPTION=ssl

App\Config\Mail

i use the laravel default setting for this. meaning i dont change anything for this file.

Controller

$email = $request['email'];

Mail::to($email)->send(new SubscribeFriend());
if (Mail::failures()) {
    dd('error');// why this is the display when details above is correct? and how to display the exact errors?
}
return redirect()->back();

This codes works yesterday and sudden and i dont know what to do. Thanks for the help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire