Issue
This is the problem:
The name associated with the email shows up as "Example"
Solution
In config/mail.php
set from
property as:
'from' => ['address' => 'someemail@example.com', 'name' => 'Firstname Lastname']
Here, address should be the one that you want to display in from email and name should be the one what you want to display in from name.
P.S. This will be a default email setting for each email you send.
If you need to use the Name as a variable through code, you can also call the function from() as follows (copying from Brad Ahrens answer below which I think is good to mention here):
return $this
->from($address = 'noreply@example.com', $name = 'Sender name')
->subject('Here is my subject')
->view('emails.view');
Answered By - Dev Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.