diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-10-05 15:35:14 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-30 22:50:22 +0100 |
commit | 90e1a949623ead173c0952f802d7b5c5487251b1 (patch) | |
tree | 544d29dde573cb135b514d0a84c2d95e9207392c /includes/mailer | |
parent | 0aa5f079258afd5276917c1aff565ec1c6411821 (diff) |
Make application name configurable
* Added app_name configuration option
* Extended `EngelsystemMailer` to prepend the application name to all mails
Closes #426
Diffstat (limited to 'includes/mailer')
-rw-r--r-- | includes/mailer/shifts_mailer.php | 8 | ||||
-rw-r--r-- | includes/mailer/users_mailer.php | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/includes/mailer/shifts_mailer.php b/includes/mailer/shifts_mailer.php index 4dd430d3..0c4e381c 100644 --- a/includes/mailer/shifts_mailer.php +++ b/includes/mailer/shifts_mailer.php @@ -65,7 +65,7 @@ function mail_shift_change($old_shift, $new_shift) if ($user['email_shiftinfo']) { engelsystem_email_to_user( $user, - '[engelsystem] ' . __('Your Shift has changed'), + __('Your Shift has changed'), $message, true ); @@ -90,7 +90,7 @@ function mail_shift_delete($shift) foreach ($users as $user) { if ($user['email_shiftinfo']) { - engelsystem_email_to_user($user, '[engelsystem] ' . __('Your Shift was deleted'), $message, true); + engelsystem_email_to_user($user, __('Your Shift was deleted'), $message, true); } } } @@ -113,7 +113,7 @@ function mail_shift_assign($user, $shift) $message .= date('Y-m-d H:i', $shift['start']) . ' - ' . date('H:i', $shift['end']) . "\n"; $message .= $room['Name'] . "\n"; - engelsystem_email_to_user($user, '[engelsystem] ' . __('Assigned to Shift'), $message, true); + engelsystem_email_to_user($user, __('Assigned to Shift'), $message, true); } /** @@ -134,5 +134,5 @@ function mail_shift_removed($user, $shift) $message .= date('Y-m-d H:i', $shift['start']) . ' - ' . date('H:i', $shift['end']) . "\n"; $message .= $room['Name'] . "\n"; - engelsystem_email_to_user($user, '[engelsystem] ' . __('Removed from Shift'), $message, true); + engelsystem_email_to_user($user, __('Removed from Shift'), $message, true); } diff --git a/includes/mailer/users_mailer.php b/includes/mailer/users_mailer.php index 5f1e6e79..23a13806 100644 --- a/includes/mailer/users_mailer.php +++ b/includes/mailer/users_mailer.php @@ -8,7 +8,10 @@ function mail_user_delete($user) { return engelsystem_email_to_user( $user, - '[engelsystem] ' . __('Your account has been deleted'), - __('Your angelsystem account has been deleted. If you have any questions regarding your account deletion, please contact heaven.') + __('Your account has been deleted'), + __( + 'Your %s account has been deleted. If you have any questions regarding your account deletion, please contact heaven.', + [config('app_name')] + ) ); } |