Spende.php 777 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class Spende extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
18
    public function __construct($from, $message, $name)
19 20
    {
        $this->subject = "MetaGer - Spende";
Dominik Hebeler's avatar
Dominik Hebeler committed
21
        $this->reply = $from;
22
        $this->message = $message;
Dominik Hebeler's avatar
Dominik Hebeler committed
23
        $this->name = $name;
24 25 26 27 28 29 30 31 32
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
Dominik Hebeler's avatar
Dominik Hebeler committed
33
        return $this->from($this->reply, $this->name)
34 35 36 37 38
            ->subject($this->subject)
            ->text('kontakt.mail')
            ->with('messageText', $this->message);
    }
}