snowfire / Beautymail

Send beautiful HTML emails with Laravel
1.24k stars 207 forks source link

could you add the ReplyTo option to the class Beautymail #115

Closed mestelles closed 4 years ago

mestelles commented 5 years ago

in class BeautyMail public function replyTo($users) { return (new PendingMail($this))->replyTo($users); } in ``` class PendingMail public function replyTo($users) { $this->replyTo = $users; return $this; } protected function fill(Mailable $mailable) { return $mailable->to($this->to) ->cc($this->cc) ->bcc($this->bcc) ->replyTo($this->replyTo);

}

emilsundberg commented 4 years ago

This is how you send a beautymail with replyTo:

$beautymail = app()->make(Snowfire\Beautymail\Beautymail::class);
$beautymail->send('emails.welcome', [], function($message) {
    $message
        ->from('bar@example.com')
        ->to('foo@example.com', 'John Smith')
        ->replyTo('foobar@example.com')
        ->subject('Welcome!');
});