Monday, April 10, 2017

Laravel 5.2 : send email via mail DERVER

I trying to send email from my laravel 5.2 app but never received the email in my inbox

here what I did

env

MAIL_DRIVER=mail
MAIL_HOST=myhosting.com
MAIL_PORT=587
MAIL_USERNAME=yousef@hosting.com
MAIL_PASSWORD=myPassword
MAIL_ENCRYPTION=tls

Controller

public function html_email(){
        $data = array('name'=>"Data Technology");
        Mail::send('emails.websitePriceRequest', $data, function($message) {
            $message->to('johnef_sh@hotmail.com', 'Data Technology')->subject
            ('Laravel HTML Testing Mail');
            $message->from('johnef_sh@hotmail.com','Data Technology');
        });
        echo "HTML Email Sent. Check your inbox.";
    }

after sending the email I get HTML Email Sent. Check your inbox.

but after checking my email noting is there



via Yousef Altaf

Advertisement