From b944dc3a5f9772ee3d4ef69cf37231d87825f4b9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 18 Feb 2020 00:33:13 -0700 Subject: [PATCH] Add admin message scaffolding --- app/Mail/AdminMessage.php | 37 +++++++++++++++++++ .../notification/admin_message.blade.php | 20 ++++++++++ 2 files changed, 57 insertions(+) create mode 100644 app/Mail/AdminMessage.php create mode 100644 resources/views/emails/notification/admin_message.blade.php diff --git a/app/Mail/AdminMessage.php b/app/Mail/AdminMessage.php new file mode 100644 index 000000000..249f66944 --- /dev/null +++ b/app/Mail/AdminMessage.php @@ -0,0 +1,37 @@ +msg = $msg; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + $admins = config('pixelfed.domain.app') . ' admins'; + return $this->markdown('emails.notification.admin_message') + ->with(['msg' => $this->msg]) + ->subject('Message from ' . $admins); + } +} diff --git a/resources/views/emails/notification/admin_message.blade.php b/resources/views/emails/notification/admin_message.blade.php new file mode 100644 index 000000000..001d2cd4c --- /dev/null +++ b/resources/views/emails/notification/admin_message.blade.php @@ -0,0 +1,20 @@ +@component('mail::message') +# Message from {{ config('pixelfed.domain.app') }}: + + +@component('mail::panel') +{{$msg}} +@endcomponent + + +
+ +Regards,
+{{ config('pixelfed.domain.app') }} + +@component('mail::subcopy') +Please do not reply to this email, this address is not monitored. +@endcomponent + +@endcomponent +