php - laravel 5.2 mail service not using global 'from' address why? -


hey guys configuring mail service comes laravel.

here's mail.php file

/* |-------------------------------------------------------------------------- | global "from" address |-------------------------------------------------------------------------- | | may wish e-mails sent application sent | same address. here, may specify name , address | used globally e-mails sent application. | */  'from' => ['address' => 'someguy@somehost.com', 'name' => 'some guy senderl'], 

here's .env file

app_env=local app_debug=true app_key=secret  db_host=localhost db_database=c9 db_username=secret db_password=  cache_driver=file session_driver=file queue_driver=sync  redis_host=localhost redis_password=null redis_port=6379  mail_driver=smtp mail_host=smtp.gmail.com mail_port=587 mail_username=secret@gmail.com mail_password=secret mail_encryption=tls 

and here's route

route::get('/email', function() {      mail::send('emails.welcome', ['name' => 'bvc'], function ($message) {     $address = 'support@secret.com';     $message->to('secret@gmail.com');     $message->from($address, 'thank you');     $message->subject('thanks signing up, need confirm email address , go'); }); 

my question this.
whenever send email sender still secret@gmail.com im sending stuff myself myself rather $message->from($address, 'thank you');
im confused on why happening. have global address filled seems getting overridden well.

this isn't laravel issue, smtp issue. smtp hosts (like gmail) not let change "from" address, or let change address linked account , verified own it. done reduce spam, shouldn't able send email , make came anyone.

if you'd able send mail support@secret.com, need link email secret@gmail.com account. in gmail, go settings, go accounts , import, , under send mail as, click add email address own. once finish process link support@secret.com gmail account, should able change address it.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -