Created
June 27, 2014 02:37
-
-
Save puriketu99/93affe792db634851afc to your computer and use it in GitHub Desktop.
GAE/Pのbackground_thread.BackgroundThreadがFrontendsNotSupportedというエラーで動かない ref: http://qiita.com/puriketu99/items/afc7426c51273ca794f4
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
from threading import Thread | |
from django.core.mail import send_mail | |
subject = 'Hello!' | |
msg = '\n \n Hello World!' | |
sender = settings.DEFAULT_FROM_EMAIL | |
to = 'x...@xx.com | |
t = Thread(target=send_mail, args=[subject, msg, sender, to], kwargs={'fail_silently': False}) | |
t.setDaemon(True) | |
t.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment