如何在回复地址中设置经过身份验证的用户的电子邮件?

I have this code to send an email to the conference organizer:

public function contactOrganizer($id, Request $request){
    $conference = Conference::find($id);

    $user = Auth::user();

    $message = $request->message;
    $subject = $request->subject;

    Mail::to($conference->organizer_email)->send(new UserNotification($conference, $user, $message, $subject));
    Session::flash('email_sent', 'Your email was sent with success for the conference organizer.');

    return redirect()->back();
}

With this code the email is sent to the conference organizer, that is correct. The issue is that in the from address, instead of appear the email of the authenticted user, the user that sent the email, it appears the email configured in the .env file in the MAIL_USERNAME. So the conference organizer receives the email but dont know the email of the user that sent the email.

So, do you know how to set a reply-to address with the email of the authenticated user?

UserNotificaiton

class UserNotification extends Mailable
{
    use Queueable, SerializesModels;

    public $conference;
    public $user;
    public $message;
    public $subject;


    public function __construct(Conference $conference, User $user, $message, $subject)
    {
        $this->conference = $conference;
        $this->user = $user;
        $this->message = $message;
        $this->subject = $subject;
    }

    public function build()
    {
        return $this
            ->from($this->user->email)
            ->to($this->conference->organizer_email)
            ->markdown('emails.userNotification', [
                'message' => $this->message,
                'subject' => $this->subject
            ]);
    }
}

You can use replyTo

public function build()
    {
        return $this
            ->from($this->user->email)
            ->to($this->conference->organizer_email)
            ->replyTo($this->user->email, $this->user->name)
            ->markdown('emails.userNotification', [
                'message' => $this->message,
                'subject' => $this->subject
            ]);
    }

Where $this->user->email and $this->user->name contains the email address and name of the authenticated user respectively.

Ref: https://laravel.com/docs/5.1/mail

You can simply add name into ->from(),->replyTo() methods. This will be more clear:

       public function build()
        {
            return $this
                ->from($this->user->email,$this->user->name)
                ->to($this->conference->organizer_email)
                // you can add another reply-to address
                ->replyTo($this->user->email, $this->user->name)
                ->markdown('emails.userNotification', [
                    'message' => $this->message,
                    'subject' => $this->subject
                ]);
        }