I have a Mailable class that sets a ReplyTo here:
class Feedback extends Mailable
{
use Queueable, SerializesModels;
public $user;
public $text;
/**
* Create a new message instance.
*
* @param User $user
* @param $text
*/
public function __construct(User $user, $text)
{
$this->user = $user;
$this->text = $text;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->from('feedback@mydomain.com')
->replyTo($this->user->email)
->subject("Feedback from {$this->user->name}")
->view('emails.feedback');
}
}
This sends the email and when I inspect it I can see that the ReplyTo has been set to the address that I want however when I try and reply to the email the to address appears as the from address i.e. feedback@mydomain.com.
I can see the reply to is present in gmail and Mailtrap but the mail clients are ignoring it.
Am I missing something?