M
M
Maxim Akhmerov2018-05-13 19:03:09
Laravel
Maxim Akhmerov, 2018-05-13 19:03:09

How to specify a different email when sending a message to mail in laravel?

used class TextMail extends Mailable
in biuld return $this->from('[email protected])
from does not help
when receiving a message, the mail used in env is always indicated.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gerasimov, 2018-05-13
@mrTeo

The documentation will help you:
https://laravel.com/docs/5.6/mail#sending-mail
Namely, the to() method:

The to method accepts an email address, a user instance, or a collection of users

O
O_Nayre, 2018-05-13
@O_Nayre

Try$this->from('[email protected]', 'Some Name')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question