mail wip
This commit is contained in:
1 parent
521e617879
commit
f9e1f9b49c
17 files changed
+295
-80
No files matched your search
+7
-16
@@ -5,7 +5,6 @@ namespace App\Mail;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Address;
|
||||
use Illuminate\Mail\Mailables\Attachment;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@@ -14,22 +13,24 @@ class Newsletter extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $mail_data;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct($mail_data)
|
||||
{
|
||||
//
|
||||
$this->mail_data = $mail_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
public function envelope($absender_email, $absender_name): Envelope
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
from: new Address($absender_email, $absender_name),
|
||||
subject: 'Newsletter',
|
||||
from: new Address($this->mail_data->absender_email, $this->mail_data->absender_name),
|
||||
subject: $this->mail_data->subjekt,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,14 +43,4 @@ class Newsletter extends Mailable
|
||||
view: 'mail.newsletter',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array<int, Attachment>
|
||||
*/
|
||||
public function attachments(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user