Sending email with WebMail in laravel 5.2

1) 
===================================================================================
.env
===================================================================================
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:xVpNKIpjAe7LoKTrVd7pKOdJrsaiLmSy8tLYMjerJMS0=
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=test_db
DB_USERNAME=root
DB_PASSWORD=

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=cpanel1.cloud.com
MAIL_PORT=587
MAIL_USERNAME=test@mywebmaildomain.com
MAIL_PASSWORD=testPassword
MAIL_ENCRYPTION=tls

===================================================================================
config/mail.php
===================================================================================

<?php return [ 'driver' => env('MAIL_DRIVER', 'smtp'),
    'host' => env('MAIL_HOST', 'cpanel1.cloud.com'),
    'port' => env('MAIL_PORT', 587),
    'from' => ['address' => 'test@mywebmaildomain.com', 'name' => 'Bacekend System'],
    'encryption' => env('MAIL_ENCRYPTION', 'tls'),
    'username' => env('MAIL_USERNAME'),
    'password' => env('MAIL_PASSWORD'),
    'sendmail' => '/usr/sbin/sendmail -bs',
];
===================================================================================
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s