this is simply awesome!
thank you !
On Thu, Jun 20, 2019 at 2:07 PM Val K wrote:
> #pretty decorator
> def with_email_to(addr):
> def inner(f):
> def emailer():
> ret = f()
> html = response.render(ret)
> ... # send html to addr by email
>
#pretty decorator
def with_email_to(addr):
def inner(f):
def emailer():
ret = f()
html = response.render(ret)
... # send html to addr by email
return html
return emailer
return inner
@with_email_to('j...@google.com')
def foo()
oops
got it!
changing it right now!
simple and brilliant, as always :)
On Thu, Jun 20, 2019 at 1:39 PM Val K wrote:
> I mean the following logic:
> def foo():
> ...
> ret = dict(...)
> if email_required:
> html = response.render(ret)
> ... # send html by email
>
I mean the following logic:
def foo():
...
ret = dict(...)
if email_required:
html = response.render(ret)
... # send html by email
return html
return ret
On Thursday, June 20, 2019 at 8:26:33 PM UTC+3, Vlad wrote:
>
> I couldn't figure out how this wok
I couldn't figure out how this woks, so just rendered it again. Not a big
deal - just a matter of convenience. The email requests come occasionally,
so this extra render doesn't cause trouble.
Thank you, Val!
On Thursday, June 20, 2019 at 6:23:55 AM UTC-4, Val K wrote:
>
> I think you can try
Are got it.
thankyou
On Sat, Aug 8, 2015 at 9:58 AM, 黄祥 wrote:
> e.g.
> *private/appconfig.ini*
> [smtp]
> server = smtp.gmail.com:587
> sender = em...@gmail.com
> login = email:password
>
> *models/db.py*
> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
> auth = Auth(d
e.g.
*private/appconfig.ini*
[smtp]
server = smtp.gmail.com:587
sender = em...@gmail.com
login = email:password
*models/db.py*
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
mail = auth.settings.mailer
mail.settings.server = 'logging' if request.is_local
I have looked at that but still cant figure out, do you have example
cheers
tony
--
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 mess
please take a look at the book :
http://web2py.com/books/default/chapter/29/08/emails-and-sms
best regards,
stifan
--
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 Iss
Yes. In at least three ways. web2py ships with pyfpdf (in gluon.contrib)
which converts html to pdf. Once you make the file you can also add as an
attachment to an email (look the web2py email API). You can install/unzip
reportlab in web2py/site-packages and use that alternatively. Also, if you
On 8 Jan 2013, at 11:40 AM, Adi wrote:
> Hi Jonathan,
> Mine is putting properly company name in front of the address, by using:
> mail.settings.sender = 'Company', but knowing that you are a guru here, may
> not be at all what you are looking for... If you wanted I could send you a
> sample e
Hi Jonathan,
Mine is putting properly company name in front of the address, by using:
mail.settings.sender = 'Company', but knowing that you are a guru here, may
not be at all what you are looking for... If you wanted I could send you a
sample email privately to see if that's what you needed?
12 matches
Mail list logo