class Message(letter.Letter): Postie = letter.DjangoPostman() From = getattr(settings, 'DEFAULT_FROM_EMAIL', '*****@*****.**') To = to Subject = subject Body = body
class Message(letter.Letter): Postie = letter.DjangoPostman() To = '*****@*****.**' From = '*****@*****.**' Subject = 'My Cool mail' Template = 'emails/cool_email' Context = { 'href': 'http://example.com', 'link': 'Examples!', }
""" Models for Who Pays This Doctor. """ import datetime as dt import hashlib import random from django.conf import settings from django.core.urlresolvers import reverse, reverse_lazy from django.db import models from django.utils import timezone import letter POSTIE = letter.DjangoPostman() class WPTDMessage(letter.Letter): Postie = POSTIE From = settings.DEFAULT_FROM_EMAIL class Doctor(models.Model): name = models.CharField(max_length=200) gmc_number = models.CharField( max_length=100, blank=True, null=True, unique=True ) job_title = models.CharField(max_length=200) primary_employer = models.CharField(max_length=200) employment_address = models.TextField()