I am sending the email using below code
Mail::send('emails.sample',[],function($message) use($attachment,$filename)
{
$message->subject('PDF is generated !');
$message->from('[email protected]', 'Example');
$message->to('[email protected]');
$message->attachData($attachment,$filename,array('mime'=>'application/pdf','Content-Disposition'=>'attachment'));
});
but after receiving the email, sender email address is coming like this
[email protected] on behalf of Example [email protected]
but it should be like either email address
or name
How do I fix this? any suggestions, please!