mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use laravel Mail facade, remove phpmailer, update seeting.example.php accordingly, remove Utility sendEmail function
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ContactUs extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $mailFrom;
|
||||
|
||||
public $mailBody;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param $mailFrom
|
||||
* @param $mailBody
|
||||
*/
|
||||
public function __construct($mailFrom, $mailBody)
|
||||
{
|
||||
$this->mailFrom = $mailFrom;
|
||||
$this->mailBody = $mailBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->from($this->mailFrom)->subject('Contact form submitted')->view('emails.contactUs')->with(['mailBody' => $this->mailBody,]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user