Created
July 26, 2011 06:38
-
-
Save yumike/1106130 to your computer and use it in GitHub Desktop.
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
Mailer.send( | |
sender = '[email protected]', | |
recipients = ['[email protected]', '[email protected]'], | |
context_data = {'site': site}, | |
template_name = 'mailer/messages/message') | |
ModelMailer.send( | |
object = message, | |
request = request, | |
recipients = Recipient.objects.values_list('email', flat=True)) | |
class MessageMailer(ModelMailer): | |
recipients = Recipient.objects.values_list('email', flat=True) | |
fail_silently = True | |
class MessageSenderMailer(ModelMailer): | |
def get_recipients(self): | |
return self.get_object().email | |
MessageMailer.send(object=message, request=request) | |
MessageSenderMailer.send(object=message, request=request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment