feat(email-blast): tambahkan kelas EmailBlastMail dan tampilan email blast
- Menambahkan kelas EmailBlastMail untuk mengelola pengiriman email blast. - Mengimplementasikan metode build untuk mengatur subjek dan konten email. - Menambahkan tampilan blast.blade.php untuk format email blast.
This commit is contained in:
29
app/Mail/EmailBlastMail.php
Normal file
29
app/Mail/EmailBlastMail.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Webstatement\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Modules\Webstatement\Models\EmailBlastHistory;
|
||||||
|
|
||||||
|
class EmailBlastMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $emailBlastHistory;
|
||||||
|
|
||||||
|
public function __construct(EmailBlastHistory $emailBlastHistory)
|
||||||
|
{
|
||||||
|
$this->emailBlastHistory = $emailBlastHistory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this->subject($this->emailBlastHistory->subject)
|
||||||
|
->view('webstatement::emails.blast')
|
||||||
|
->with([
|
||||||
|
'content' => $this->emailBlastHistory->content
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
24
resources/views/emails/blast.blade.php
Normal file
24
resources/views/emails/blast.blade.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Email Blast</title>
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: monospace;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-align-center{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.ql-align-right{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{!! $content !!}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user