1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/app/Mail/TestMailServer.php

50 lines
1.2 KiB
PHP
Raw Normal View History

<?php
2020-08-06 05:04:09 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2020-08-06 05:04:09 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2024-04-12 06:15:41 +02:00
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
2020-08-06 05:04:09 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2020-08-06 05:04:09 +02:00
*/
namespace App\Mail;
use Illuminate\Mail\Mailable;
class TestMailServer extends Mailable
{
2021-07-21 12:00:42 +02:00
public $support_messages;
public $from_email;
2021-07-21 12:00:42 +02:00
public function __construct($support_messages, $from_email)
{
2021-07-21 12:00:42 +02:00
$this->support_messages = $support_messages;
$this->from_email = $from_email;
}
/**
* Test Server mail.
*
* @return $this
*/
public function build()
{
2024-01-14 05:05:00 +01:00
$settings = new \stdClass();
$settings->primary_color = '#4caf50';
2021-09-02 08:17:46 +02:00
$settings->email_style = 'dark';
2023-02-21 07:07:27 +01:00
$settings->email_alignment = 'left';
2024-01-14 05:05:00 +01:00
return $this->from(config('mail.from.address'), config('mail.from.name'))
->subject(ctrans('texts.email'))
->markdown('email.support.message', [
2021-07-21 12:00:42 +02:00
'support_message' => $this->support_messages,
'system_info' => '',
'laravel_log' => [],
2021-09-02 08:17:46 +02:00
'settings' => $settings,
]);
}
}