<?php

namespace App\Mail;

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

class MyTestMail extends Mailable
{
    use Queueable, SerializesModels;
    public $datamesaj;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($datamesaj)
    {
        $this->datamesaj=$datamesaj;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()

    {



            $verial=EmailConfiguration::find(1);
            $address = $verial->sender_email;
            $subject = 'Yeni Bir Mesaj Aldınız!';
            $name = $verial->sender_name;
            return $this->view('mail.teklifform')->from($address,$name)->subject($subject)->replyTo($address,$name);




    }
}
