Example #1
0
    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)
Example #2
0
	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)
Example #3
0
	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)
Example #4
0
    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)