-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
35 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ from notipyer.email_notify import send_email | |
|
||
subject = 'My Email Subject' | ||
body = 'My Email Body' | ||
reply_to_recipient = '[email protected]' # Can be None | ||
to_recipients = ['[email protected]', '[email protected]'] # Can be None | ||
cc_recipients = ['[email protected]', '[email protected]'] # Can be None | ||
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None | ||
|
@@ -49,7 +50,7 @@ html = """\ | |
""" # Can be None | ||
is_async = True # Sent as an async email only if this parameter is True | ||
|
||
send_email(subject, body, to_recipients, cc_recipients, bcc_recipients, attachment_path, html_text, is_async) | ||
send_email(subject, body, to_recipients, reply_to_recipient, cc_recipients, bcc_recipients, attachment_path, html_text, is_async) | ||
``` | ||
|
||
## Slack Notifications | ||
|
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 |
---|---|---|
|
@@ -10,4 +10,8 @@ | |
cc_recipients = ['[email protected]', '[email protected]'] | ||
bcc_recipients = ['[email protected]', '[email protected]'] | ||
|
||
send_email(subject, body, to_recipients, cc_recipients, bcc_recipients) | ||
send_email(subject=subject, | ||
message=body, | ||
to_addr=to_recipients, | ||
cc_addr=cc_recipients, | ||
bcc_addr=bcc_recipients) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
name = "myname" | ||
username = "[email protected]" | ||
password = "myapppassword" | ||
target_email = "[email protected]" | ||
|
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 |
---|---|---|
|
@@ -14,5 +14,13 @@ | |
</html> | ||
""" | ||
|
||
print(send_email("my_subject", "my_content", [target_email], attachment_path='credentials.py.sample', is_async=True, html_text=html)) | ||
print(target_email) | ||
|
||
print(send_email(subject="my_subject", | ||
message="my_content", | ||
to_addr=[target_email], | ||
reply_to_addr="[email protected]", | ||
attachment_path='credentials.py.sample', | ||
is_async=True, | ||
html_text=html)) | ||
print('Email Sent') |