dimanche 3 mars 2019

Email send error on Laravel (Only Ubuntu) homestead works fine

I'm working on Laravel 5.7 And ubuntu 18.04. Before using ubuntu server, I was working on homestead, Email sending works fine. same file, same settings. Here's my codes.

  1. .env

    MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=ssl

  2. config/mail.php

    `'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST', 'smtp.gmail.com'), 'port' => env('MAIL_PORT', 465), 'encryption' => env('MAIL_ENCRYPTION', 'ssl'),

....`

This codes works fine on Homestead environment. also I tried MAIL_PORT=587 and MAIL_ENCRYPTION=tls But this not works on my homestead too. MAIL_DRIVER=sendmail same. After`php artisan cache:clear&php artisan config:cache It's same.

I thought Its because Username and password are empty? It works fine on Homestead, But after I write my infos , It's same. How can I solve this prob? MAIL_HOST=smtp.googlemail.com not working too.

After copying files on Ubuntu, I must do something like server settings? Can I find some logs in my LAMP Ubuntu env?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire