-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #139: 'Mail delivery may take too long under some circumstances'
- Loading branch information
1 parent
eb0bb83
commit 7420d65
Showing
7 changed files
with
37 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Functionality related to mail delivery. | ||
@date: Apr 18, 2013 | ||
@author: CarolinaFernandez | ||
""" | ||
|
||
from django.core.mail import send_mail as django__send_mail | ||
from ServiceThread import ServiceThread | ||
|
||
def send_mail(subject, message, from_email, recipient_list): | ||
""" | ||
Wrapper for the send_mail method within django.core.mail | ||
which uses a thread to decouple its execution from the | ||
main program. This is specially useful if mail server | ||
configuration is erroneus, server is very busy, etc; so | ||
normal flow will not be affected. | ||
""" | ||
ServiceThread.start_method_new_thread( | ||
django__send_mail, | ||
None, | ||
None, | ||
subject, | ||
message, | ||
from_email, | ||
recipient_list, | ||
) | ||
|
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