41 lines
861 B
PHP
41 lines
861 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class SimpleMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
// Optionale Daten, die an das Blade-Template übergeben werden
|
|
// this is a test
|
|
public string $title;
|
|
|
|
public string $body;
|
|
|
|
public function __construct(string $title, string $body)
|
|
{
|
|
$this->title = $title;
|
|
$this->body = $body;
|
|
}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'Dies ist eine einfache Test-Mail',
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'mail.simple', // Pfad zum Blade-Template
|
|
);
|
|
}
|
|
}
|