[web2py] Re: Using the Template System to Generate Emails

2010-03-21 Thread annet
In the send_mail.html view I have a link which reads like: Having trouble viewing this email? View it in your browser When I send the mail and open it this link reads like: Having trouble viewing this email? View it in your browser Does one of you know why the href isn't being rendered? Kind r

Re: [web2py] Re: Using the Template System to Generate Emails

2010-03-20 Thread Thadeus Burgess
cache the mail and only access it if its no longer cached? Or have a table that stores all sent mailings sent_mail -> bedrijf -> message You still query the database, but you have to store the info somewhere at some point in time if it is to be accessed later. -Thadeus On Sat, Mar 20,

[web2py] Re: Using the Template System to Generate Emails

2010-03-20 Thread annet
I have another question: In case the user would like to view the html mail in his browser, I have got the following line of code: {{if not request.function=='browser_version':}} Having trouble viewing this email? View it in your browser {{pass}} I would like to use the same view, h

[web2py] Re: Using the Template System to Generate Emails

2010-03-20 Thread annet
Denes and Alexandre, Your replies were very helpful and helped me understand and solve the problem, thanks. Thadeus, > Use the following class lined out in the wiki, works like a charm. I will, in one of the next iterations. At the moment I am not yet proficient enough in Python to completely

Re: [web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread Thadeus Burgess
The reason is because the content type is encoded as Text not HTML. Without the proper meta information sent to the SMTP server, emails will not display correctly. Use the following class lined out in the wiki, works like a charm. http://wiki.web2py.com/Sending_Email_with_Plain_Text_HTML_Versions

Re: [web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread Alexandre Andrade
the trick is that message is first text, then html mail.send(to=[recipient],subject='Controleer uw adresgegevens in Fitwise',message=message) will result in a text message. to render as html, is : mail.send(to=[recipient],subject='Controleer uw adresgegevens in Fitwise',message=[None,message])

[web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread DenesL
Annet, maybe this will help http://groups.google.com/g/4247fb7b/t/4b6d3b0c8a822c83/d/7964e5b019d1c3d9 On Mar 19, 12:49 pm, annet wrote: > In my application all functions related to sending mail from it work. > The main function reads like: > > def send_mail(): > > nfas=db(db.nfa.nfatype==4).sele

[web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread annet
In my application all functions related to sending mail from it work. The main function reads like: def send_mail(): nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf) for nfa in nfas: context=dict(nfa=nfa) message=response.render('clublocatormail/ send_mail

[web2py] Re: Using the Template System to Generate Emails

2010-03-18 Thread annet
Hi Denes, > because you have for nfa in nfas: so each nfa is a record > (from the group of records or 'Rows' object called nfas) This is what caused my confusion, in my cms app I had the following lines of code: record=db(db.betalingsgegevens.bedrijf==auth.user.bedrijf).select() record_id=re

[web2py] Re: Using the Template System to Generate Emails

2010-03-14 Thread DenesL
On Mar 14, 4:18 am, annet wrote: > Hi Denes, > > This send_mail function works: > > def send_mail(): > > nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf) >     for nfa in nfas: >         context=dict(nfa=nfa) >         message=response.render('clublocatormail/ > send_mail.htm

[web2py] Re: Using the Template System to Generate Emails

2010-03-14 Thread annet
Hi Denes, This send_mail function works: def send_mail(): nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf) for nfa in nfas: context=dict(nfa=nfa) message=response.render('clublocatormail/ send_mail.html',context) recipient=nfa.adres mail.s

[web2py] Re: Using the Template System to Generate Emails

2010-03-12 Thread DenesL
Hi Annet, long time no see. >From the gluon/tools.py source under class Mail function send: to: list or tuple of receiver addresses; will also accept single object Hope this helps, Denes. On Mar 12, 12:34 pm, annet wrote: > I am trying to work out a working version of this: Using the Template