def handle(self, *args, **options): class RawEmail(): def __init__(self, email): self.email = email to_address = '*****@*****.**' from_address = '*****@*****.**' subject = 'one off test' html = '''<p>This message was sent to: {{ email }}</p>''' send_raw_email(RawEmail(to_address), from_address, subject, html) print 'test sent'
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>''' send_raw_email(RawEmail(to_address), from_address, subject, html, just_prepare=True) print 'test prepared'