I'm getting

"Call to undefined method Illuminate\Notifications\Messages\MailMessage::replyTo() in ... /TeamMessage.php:68"

I tried to set the replyTo address for notifications like this in TeamMessage.php:

    public function toMail($notifiable)
    return (new MailMessage)
        ->replyTo('myemail@gmail.com', 'My Name')

I'm guessing it isn't possible to set header info here? Is there another way?I'm using the replyTo() method described at https://laravel.com/api/5.3/Illuminate/Notifications/Messages/MailMessage.html

Edit To add some clarification: I need to be able to set the reply-to address dynamically, so it won't work to hardcode it in a config somewhere.

Question author Sersun | Source



The error makes no sense at all. This method is present in MailMessage, the only thing that would make sense is a missing method in your version of the repository. replyTo() is kind of new (nov 2016), so did you

composer update


This is the related commit:


Answer author Antonio-carlos-ribeiro

Ask about this question here!