コード例 #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)
コード例 #2
0
ファイル: models.py プロジェクト: ghinch/Mail-Engine
	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)
コード例 #3
0
ファイル: api.py プロジェクト: ghinch/Mail-Engine
	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)
コード例 #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)