forked from CenterForOpenScience/osf.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add code to allow cc-ing fellow institutional admins
- Loading branch information
John Tordoff
committed
Dec 9, 2024
1 parent
cd45df2
commit 0a90637
Showing
6 changed files
with
133 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,17 +76,27 @@ def render_message(tpl_name, **context): | |
|
||
|
||
def send_mail( | ||
to_addr, mail, from_addr=None, mailer=None, celery=True, | ||
username=None, password=None, callback=None, attachment_name=None, | ||
attachment_content=None, **context): | ||
"""Send an email from the OSF. | ||
Example: :: | ||
to_addr, | ||
mail, | ||
from_addr=None, | ||
cc_addr=None, # Add CC recipients | ||
mailer=None, | ||
celery=True, | ||
username=None, | ||
password=None, | ||
callback=None, | ||
attachment_name=None, | ||
attachment_content=None, | ||
**context): | ||
""" | ||
Send an email from the OSF. | ||
Example: | ||
from website import mails | ||
mails.send_email('[email protected]', mails.TEST, name="Foo") | ||
:param str to_addr: The recipient's email address | ||
:param str cc_addr: The CC recipient's email address (or list of addresses) | ||
:param Mail mail: The mail object | ||
:param str mimetype: Either 'plain' or 'html' | ||
:param function callback: celery task to execute after send_mail completes | ||
|
@@ -112,6 +122,7 @@ def send_mail( | |
to_addr=to_addr, | ||
subject=subject, | ||
message=message, | ||
cc_addr=cc_addr, # Include CC in kwargs | ||
ttls=ttls, | ||
login=login, | ||
username=username, | ||
|