Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)