Socieboy\Forum\Jobs\Replies\PostReply::sendEmail PHP Method

sendEmail() public method

Send an email to the conversation owner.
public sendEmail ( Illuminate\Mail\Mailer $mailer, Reply $reply )
$mailer Illuminate\Mail\Mailer
$reply Socieboy\Forum\Entities\Replies\Reply
    public function sendEmail(Mailer $mailer, Reply $reply)
    {
        $data = ['posted_by' => $reply->user->{config('forum.user.username')}, 'link' => route('forum.conversation.show', $reply->conversation->slug)];
        $mailer->queue('Forum::Emails.template', ['data' => $data], function ($message) use($reply) {
            $message->from(config('forum.emails.from'), config('forum.emails.from-name'));
            $message->to($reply->conversation->user->email, $reply->conversation->user->{config('forum.user.username')})->subject(config('forum.emails.subject'));
        });
    }