Sprachdatei.php 969 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

namespace App\Mail;

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

class Sprachdatei extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($message, $fileContent, $filename)
    {
        $this->subject     = "MetaGer - Sprachdatei";
        $this->reply       = "noreply@metager.de";
        $this->message     = $message;
        $this->fileContent = $fileContent;
        $this->filename    = $filename;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->from($this->reply)
            ->cc('carsten@suma-ev.de')
            ->subject($this->subject)
            ->text('kontakt.mail')
            ->with('messageText', $this->message)
            ->attachData($this->fileContent, $this->filename);
    }
}