def queue_mail(to_addr, mail, send_at, user, **context):
 new_mail = QueuedMail(user=user, to_addr=to_addr, send_at=send_at, email_type=mail['template'], data=context)
 new_mail.save()
 return new_mail

def queue_mail ( to_addr , mail , send_at , user , ** context ) : new_mail = QueuedMail ( user = user , to_addr = to_addr , send_at = send_at , email_type = mail [ 'template' ] , data = context ) new_mail . save ( ) return new_mail
queue an email to be sent using send_mail after a specified amount of time and if the presend returns true .