manually overwritting the email address of all recipients of an Email notification with the proxy-mail 'bremencalling@bsmd.de'. This is useful to test the feature before enabling it to the live-system.

This commit is contained in:
Max Metz 2024-07-31 15:18:47 +02:00
parent 0de0baf1d4
commit 0d13ffd626

View File

@ -415,12 +415,17 @@ class Notifier():
this 'naive' method creates a message and simply sends it to all users in a list of users.
Afterwards, the database will be updated, so the shipcall no longer requires a notification.
"""
email_tgts = [user.user_email for user in users if user.user_email is not None]
#email_tgts = [user.user_email for user in users if user.user_email is not None]
email_tgts = ["bremencalling@bsmd.de" for user in users if user.user_email is not None]
ship_name, evaluation_message, eta_etd, eta_etd_type = Notifier.prepare_notification_body(notification)
# avoid multi-mails, when (for some reason) multiple users share the same email address.
email_tgts = list(set(email_tgts))
# prepare and build the Email content
content = get_default_html_email()
files = [] # optional attachments
ship_name, evaluation_message, eta_etd, eta_etd_type = Notifier.prepare_notification_body(notification)
msg_multipart,msg_content = create_shipcall_evaluation_notification(
email_handler, ship_name, evaluation_message, eta_etd, eta_etd_type, content, files=files
)