def get_email(): if request.method == "GET": return False # return "<img src='/static/bilu.jpg' width='100%' height='100%'>" email_from = request.form["from"].encode("utf8") subject = request.form["subject"].encode("utf8") response = router(subject, "sendgrid", email=email_from, subject=subject) if response != "SAIR": return send_email(response, email_from, subject) else: return "OK"
def get_email(): if request.method == 'GET': return False # return "<img src='/static/bilu.jpg' width='100%' height='100%'>" email_from = request.form["from"].encode('utf8') subject = request.form["subject"].encode('utf8') response = router(subject, "sendgrid", email=email_from, subject=subject) if response != 'SAIR': return send_email(response, email_from, subject) else: return "OK"
def run(self): response = get_torrent(self.busca) if self.service == u"sendgrid": response = response + "<br>" response += u"<br>-------<br>"+\ u"\"Busquem conhecimento\" - ET Bilu<br>" +\ u"<img src='http://vaibilu.com/static/bilu_small.jpg'>" return send_email(response, self.email, self.subject) elif self.service == "twitter": if response: response = response[:160] else: response = u'Busquem conhecimento!'
def run(self): response = get_weather(self.busca) if self.service == u"sendgrid": response = response+"<br>" response += u"<br>-------<br>"+\ u"\"Busquem conhecimento\" - ET Bilu<br>" +\ u"<img src='http://vaibilu.com/static/bilu_small.jpg'>" return send_email(response, self.email, self.subject) elif self.service == "twitter": if response: response = response[:160] else: response = u'Busquem conhecimento!'