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.send(to=[recipient],subject='Controleer uw adresgegevens
in Fitwise',message=message)
return True
I do have a question though: why recipient=nfa.adres and not
recipient=nfa[0].adres
Furthermore, I don't think this function is very robust. It returns
True on success, but that's all. What happens when the send function
returns a False? Shouldn't I keep track of the Trues and Falses the
send function returns for every mail sent?
Kind regards,
Annet
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.