mercredi 29 août 2018

how to send mail from Web-mail in Laravel

I have successfully send email from my application using Gmail account.

Now I want to send email using Web-mail account from my application.

After changing inside .env and config/mail.php files,s I can't send mail and got error

local.ERROR: Failed to authenticate on SMTP server with username "info@sencare.com.bd" using 2 possible authenticators

.env file

MAIL_DRIVER=smtp
MAIL_HOST=sencare.com.bd
MAIL_PORT=587
MAIL_USERNAME=info@sencare.com.bd
MAIL_PASSWORD=&&Pass@2018&& //my webmail password, not application specific password like gmail
MAIL_ENCRYPTION=tls

.config/mail.php file

'driver' => env('MAIL_DRIVER', 'smtp'),


'host' => env('MAIL_HOST', 'sencare.com.bd'),


'port' => env('MAIL_PORT', 587),


'from' => [
    'address' => 'info@sencare.com.bd', 
    'name' => 'Bacekend System',
],

'encryption' => env('MAIL_ENCRYPTION', 'tls'),

'username' => env('MAIL_USERNAME'),

'password' => env('MAIL_PASSWORD'),

'sendmail' => '/usr/sbin/sendmail -bs',



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire