Example #1
0
 def handle(self, *args, **options):
     from_address = '*****@*****.**'
     subject = 'one off test'
     
     html = '<p>Hello</p>lksjdlfkdj'
     
     users = User.objects.all()
     
     send_siteusers_email(users, from_address, subject, html)
     
     print 'Email Sent'
     
Example #2
0
    def handle(self, *args, **options):
        class RawEmail():
            def __init__(self, email):
                self.email = email
                
        to_address = settings.ADMINS[0][1]
        from_address = '*****@*****.**'
        subject = 'one off test - just prepared'
        
        html = '''<p>This message was sent to: {{ email }}</p>'''
        
        user = User.objects.all()[0]

        send_siteusers_email(
                [user],
                from_address,
                subject,
                html,
                just_prepare=True
                )

        print 'test prepared'