<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;

class MailController extends Controller
{
    


	public function sendMail($token,$toUser,$profile){


    Mail::send('emails.contact',['token' => $token,'toUser' => $toUser, 'profile' => $profile],function ($message)use ($token, $toUser) {
        $message->from('guntref@untref.edu.ar');
        $message->to($toUser,'Admin')->subject('Comunicación UNTREF');
    });

}

    public function sendMailLogin($token,$toUser,$profile){

        Mail::send('emails.contactLogin',['token' => $token,'toUser' => $toUser, 'profile' => $profile],function ($message)use ($token, $toUser) {
            $message->from('guntref@untref.edu.ar');
            $message->to($toUser,'Admin')->subject('Comunicación UNTREF');
        });

    }

    public function sendMailNotifications($token,$toUser){


        Mail::send('emails.notification',['token' => $token,'toUser' => $toUser],function ($message)use ($token, $toUser) {
            $message->from('guntref@untref.edu.ar');
            $message->to($toUser,'Admin')->subject('Comunicación UNTREF');
        });

    }


}
