<?php

namespace Daite\Coopdigital\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class CorreoRecuperarContrasena extends Mailable
{
    use Queueable, SerializesModels;

    public $datosFormulario;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($datosFormulario) {

        $this->datosFormulario = $datosFormulario;

    }

    /**
     * Build the message.
     *
     * @return $this
     */

    public function build() {

        $datosFormulario = $this->datosFormulario;

        return $this
        
        ->subject('¡Recuperación de contraseña!')
        ->to($datosFormulario['correo'])
        ->view('coopdigital::correos.recuperacionContrasena', $datosFormulario);

    }

}
