Define plain-text version of mails
MODIFY
app/Mail/PasswordChanged.php
app/Mail/PasswordChanged.php
@@ -22,7 +22,9 @@ class PasswordChanged extends Mailable
public function build()
{
- return $this->view('emails.password_changed')
+ return $this
+ ->view('emails.password_changed')
+ ->text('emails.password_changed_plain')
->with([
'updated_at' => $this->updated_at
]);

MODIFY
app/Mail/ResetPassword.php
app/Mail/ResetPassword.php
@@ -21,7 +21,10 @@ class ResetPassword extends Mailable
public function build()
{
- return $this->view('emails.reset_password', [
+ return $this
+ ->view('emails.reset_password')
+ ->text('emails.reset_password_plain')
+ ->with([
'token' => $this->token
]);
}

MODIFY
app/Mail/VerifyRegistration.php
app/Mail/VerifyRegistration.php
@@ -22,7 +22,9 @@ class VerifyRegistration extends Mailable
public function build()
{
- return $this->view('emails.verify_registration')
+ return $this
+ ->view('emails.verify_registration')
+ ->text('emails.verify_registration_plain')
->with([
'name' => $this->user->name,
'verification_token' => $this->user->verification_token

MODIFY
app/Mail/WeeklyReport.php
app/Mail/WeeklyReport.php
@@ -28,7 +28,9 @@ class WeeklyReport extends Mailable
public function build()
{
- return $this->view('emails.weekly_report')
+ return $this
+ ->view('emails.weekly_report')
+ ->text('emails.weekly_report_plain')
->with([
'space' => $this->space,
'week' => $this->week,

ADD
resources/views/emails/password_changed_plain.blade.php
+Heads up! Your password has been changed ({{ $updated_at }} CEST).

ADD
resources/views/emails/reset_password_plain.blade.php
+Use the link below to reset your password.
+
+{{ config('app.url') }}/reset_password?token={{ $token }}

ADD
resources/views/emails/verify_registration_template.blade.php
+Welcome aboard, {{ $name }}
+
+We're going to help you get insight into your personal finances.
+
+No more dealing with pesky, half-assed spreadsheets.
+
+Use the link below to verify.
+
+{{ config('app.url') . '/verify/' . $verification_token }}

ADD
resources/views/emails/weekly_report_report.blade.php
+Here's your weekly report for {{ $space->name }}.
+
+This week (#{{ $week }}) you've
+- Spent {!! $space->currency->symbol !!} {{ \App\Helper::formatNumber($totalSpent / 100) }}
+@if (count($largestSpendingWithTag))- Most of which you've spent on {{ $largestSpendingWithTag[0]->tag_name }} ({!! $space->currency->symbol !!} {{ \App\Helper::formatNumber($largestSpendingWithTag[0]->amount / 100) }})@endif
+
+Tired of these reports? Use the link below to change your preferences.
+
+{{ config('app.url') . '/settings/preferences' }}

Define plain-text version of mails