diff --git a/app/Mail/AdminMessageResponse.php b/app/Mail/AdminMessageResponse.php new file mode 100644 index 000000000..a42dfa14d --- /dev/null +++ b/app/Mail/AdminMessageResponse.php @@ -0,0 +1,71 @@ +contact->getMessageId(); + + return new Headers( + messageId: $mid, + text: [ + 'X-Entity-Ref-ID' => $mid, + ], + ); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + return new Envelope( + subject: ucfirst(strtolower(config('pixelfed.domain.app'))).' Contact Form Response [Ticket #'.$this->contact->id.']', + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + return new Content( + markdown: 'emails.contact.admin-response', + with: [ + 'url' => $this->contact->userResponseUrl(), + ], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/resources/views/emails/contact/admin-response.blade.php b/resources/views/emails/contact/admin-response.blade.php new file mode 100644 index 000000000..d04d3218a --- /dev/null +++ b/resources/views/emails/contact/admin-response.blade.php @@ -0,0 +1,24 @@ + +Hello **@{{$contact->user->username}}**, + +You contacted the admin team of {{config('pixelfed.domain.app')}} with the following inquiry: + + +{{str_limit($contact->message, 80)}} + + + + View Admin Response + + + +or copy and paste the following url: {{$url}} + +
+
+
+ +Thanks,
+The {{ ucfirst(config('pixelfed.domain.app')) }} Admin Team +
+