def send(self): recipients = self.recipients params = {SUBJECT: self.subject, BODY: self.body, SENDER: self.sender} for addr in recipients: params[RECIPIENT] = addr tasks.add('/dispatch', params, MAILQUEUE) self.sent = True db.put(self)
def send(self): recipients = self.recipients params = { SUBJECT : self.subject, BODY : self.body, SENDER : self.sender } for addr in recipients: params[RECIPIENT] = addr tasks.add('/dispatch', params, MAILQUEUE) self.sent = True db.put(self)
def post(self): args = self.request.arguments() args.sort() params = {} for arg in args: params[arg] = self.request.get(arg) try: token = self.request.headers['Mail-Engine-Auth-Token'] except: token = '' if auth.check(token, urllib.urlencode(params), self.request.remote_addr): tasks.add('/build', params=params)