mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Make email messages Markdown.
This commit is contained in:
@@ -58,23 +58,9 @@ class AutomationHandler
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
$user = $repository->find($event->userId);
|
||||
if (null !== $user && 0 !== $event->groups->count()) {
|
||||
|
||||
$email = $user->email;
|
||||
|
||||
// see if user has alternative email address:
|
||||
$pref = app('preferences')->getForUser($user, 'remote_guard_alt_email');
|
||||
if (null !== $pref) {
|
||||
$email = $pref->data;
|
||||
}
|
||||
|
||||
// if user is demo user, send to owner:
|
||||
if ($user->hasRole('demo')) {
|
||||
$email = config('firefly.site_owner');
|
||||
}
|
||||
|
||||
try {
|
||||
Log::debug('Trying to mail...');
|
||||
Mail::to($user->email)->send(new ReportNewJournalsMail($email, '127.0.0.1', $event->groups));
|
||||
Mail::to($user->email)->send(new ReportNewJournalsMail($event->groups));
|
||||
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
Log::debug('Send message failed! :(');
|
||||
|
||||
Reference in New Issue
Block a user