Make use of some settings #136
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
@@ -24,12 +25,16 @@ public function __construct(public array $offer) {}
|
||||
*/
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
$companyEmail = Setting::get('company.email');
|
||||
|
||||
return new Envelope(
|
||||
// TODO: get from settings
|
||||
from: new Address('buchhaltung@tooloop.de', 'Tooloop Multimedia'),
|
||||
bcc: [new Address('daniel.stock@tooloop.de', 'Daniel Stock')],
|
||||
from: new Address($companyEmail, Setting::get('company.name')),
|
||||
// TODO: get current user name
|
||||
bcc: [new Address($companyEmail, 'Daniel Stock')],
|
||||
subject: 'Auftragsbestätigung',
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
@@ -26,8 +27,7 @@ public function __construct(public array $invoice) {}
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
// TODO: get from settings
|
||||
from: new Address('buchhaltung@tooloop.de', 'Tooloop Multimedia'),
|
||||
from: new Address(Setting::get('company.email'), Setting::get('company.name')),
|
||||
subject: 'Zahlungserinnerung',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user