Hello Massimo , i´m using the code from your tutorials.
Then i adapted to add an html template.
I guess google as a thing with base64 images...
2018-06-01 20:58 GMT+01:00 Massimo Di Pierro <massimo.dipie...@gmail.com>:
> Very strange. Can you show us the code to generate the email and the html
> in the email?
>
>
> On Wednesday, 16 May 2018 11:14:55 UTC-5, Ramos wrote:
>>
>> Hello i´m sending html emails but some clients for example google have an
>> issue with images
>>
>> Google is showing this code for the original html email...
>>
>> <a href=*3D*"https://www.iol.pt" target=*3D*"_blank">
>>
>> instead of
>> <a href="https://www.iol.pt" target="_blank">
>>
>> what could be the issue with *3D ???*
>>
>> regards
>> António
>>
>>
>>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def send_emails_deferred(params):
# print "creating deferred emails", params
id = db.emails.insert(userid=params["userid"], event=params["event"],
link=params["link"], sendto=params["to"], subject=params[
"subject"], body=params["message"],
sender=params["sender"], status='pending', template=params["template"],
country=params["country"])
print "emails id", id
scheduler.queue_task(send_pending_emails, pvars=dict(id=id))
def paramsforTemplate(template):
if template == "monthlyreport":
return {
"pending": kpi_pending(),
"obsolete": kpi_obsolete(),
"performance": kpi_performance(4)
}
else:
return {}
def send_pending_emails(id):
row = db(db.emails.id == id).select().first()
T.force(row["country"])
moreparams = paramsforTemplate(row.template)
extraparams = dict(body=row["body"],
link=row["link"],
country=row["country"])
extraparams.update(moreparams)
html = response.render("templates/" + row.template + ".html", extraparams)
if row["event"]:
event = db.events[row["event"]]
receipts = db.events[int(event)]["receipts"]
if mail.send(to=row.sendto, subject=row.subject, message=("", html),
sender="File It <antonio.ra...@cires.pt>"):
# row.update_record(status='sent',sent_on=request.now)
del db.emails[id]
# db.log.insert(msg=str(receipts))
if row["event"]:
receipts[str(row["userid"])] = {
"status": "sent", "data": request.utcnow}
db(db.events.id == row["event"]).update(receipts=receipts)
else:
row.update_record(status='failed')
# receipts[row["userid"]]={"status":"failed","data":request.now}
# db(db.events.id==row["event"]).update(receipts=receipts)
db.commit()
Title: Template Base
{{=XML(T("FileIt:Manage your documents Online"))}}
|
|
|
|
|
{{=XML(T("Notification received"))}}
|
|
|
|
|
|
This is an email sent from the FileIt: Document management online Visit File.it to view the full app
|
|
|
|
|
|