Make email messages Markdown.

This commit is contained in:
James Cole
2022-03-29 12:45:48 +02:00
parent 9c19a08b17
commit 09bd0b572a
71 changed files with 747 additions and 555 deletions

View File

@@ -40,23 +40,17 @@ class ReportNewJournalsMail extends Mailable
{
use Queueable, SerializesModels;
public string $email;
public Collection $groups;
public string $ipAddress;
public array $transformed;
/**
* ConfirmEmailChangeMail constructor.
*
* @param string $email
* @param string $ipAddress
* @param Collection $groups
*/
public function __construct(string $email, string $ipAddress, Collection $groups)
public function __construct(Collection $groups)
{
$this->email = $email;
$this->ipAddress = $ipAddress;
$this->groups = $groups;
$this->groups = $groups;
}
/**
@@ -68,8 +62,9 @@ class ReportNewJournalsMail extends Mailable
{
$this->transform();
return $this->view('emails.report-new-journals-html')->text('emails.report-new-journals-text')
->subject((string)trans_choice('email.new_journals_subject', $this->groups->count()));
return $this
->markdown('emails.report-new-journals')
->subject((string) trans_choice('email.new_journals_subject', $this->groups->count()));
}
private function transform(): void