Email¶
Email API provides all email functions for HEPData. |
|
Provides high-level common email utilities. |
hepdata.modules.email.api¶
Email API provides all email functions for HEPData.
- hepdata.modules.email.api.send_new_review_message_email(review, message, user)[source]¶
Sends a message to all uploaders and reviewers to tell them that a comment has been made on a record.
- Parameters:
review
message
user
- Returns:
- hepdata.modules.email.api.send_notification_email(recid, version, user, reviewers_notified, message=None, show_detail=True)[source]¶
- Parameters:
recid
user – user object
reviewers_notified – whether reviewers have already been notified about this upload
show_detail – whether to show the status and messages for each data table
message
- Returns:
- hepdata.modules.email.api.send_coordinator_notification_email(recid, version, user, message=None)[source]¶
- Parameters:
recid
user – user object
message – message to send
- Returns:
- hepdata.modules.email.api.send_cookie_email(submission_participant, record_information, message=None, version=1, reminder=False)[source]¶
Sends an email to either an uploader, or reviewer containing their invitation cookie/token and any custom messaging.
- Parameters:
submission_participant – A SubmissionParticipant object, to receive the email reminder
record_information – Record object containing record information
version – The record version (Default is 1)
message – Any specific message text input into the form (Default is None)
reminder – Whether the reminder should be sent or not
- hepdata.modules.email.api.send_reserve_email(submission_participant, record_information, message=None)[source]¶
Sends an email to notify an uploader or reviewer that they have been demoted to reserve status.
- Parameters:
submission_participant – A SubmissionParticipant object, to receive the email
record_information – Record object containing record information
message – Any specific message text input into the form (Default is None)
- hepdata.modules.email.api.notify_submission_created(record, coordinator_id, uploaders, reviewers, version=1)[source]¶
Send a submission or revision creation email for a record
- Parameters:
record – Dictionary containing record data
coordinator_id – Associated coordinator ID for submission
uploaders – List of associated uploaders
reviewers – List of associated reviewers
version – Is revision or not. Determines subject text
- Returns:
hepdata.modules.email.utils¶
Provides high-level common email utilities.
- hepdata.modules.email.utils.create_send_email_task(destination, subject, message, reply_to_address=None)[source]¶
Schedules a task to send an email.
- Parameters:
destination
subject
message
reply_to_address
- Returns:
send_email
- hepdata.modules.email.utils.send_flask_message_email(message)[source]¶
Creates a task to send an email from a flask_mail.Message instance