<?php

namespace App\Mail;

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

class newContato extends Mailable
{
    use Queueable, SerializesModels;
     private $req;
    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($req)
    {
        $this->req = $req;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $req = $this->req;

        $this->subject('Contato cliente pelo site');
        //$this->to(env('MAIL_USERNAME'),env('TechSoft Sistemas'));
        //$this->to('geovanekopicz@gmail.com','kopicz');
        $this->replyTo($req->email, $req->nome);

        return $this->markdown('mail.newContato', compact('req'));

        // return $this->from('davidrichard.ms@gmail.com')
        //     ->view('mail.newContato');

    }
}
