On Thursday, August 4, 2011 4:25:49 AM UTC-4, Ramos wrote:
>
> That is obvious right, but why not one step ahead?
>
> It would be simpler if a programmer just code
>
>  mail.send(groupname,subject="demo",message="demo") 
>
> web2py send function should detect if its a user or a group and if a group, 
> send the messsage to all members.
>
 
I assume you mean groupname is the name of a group in the auth_group table. 
Note, Mail and Auth are separate classes, and Mail does not know about Auth, 
so we would first have to pass the Auth object to Mail somehow. A better 
option might be to add a convenience method to Auth to easily extract the 
members (and possibly individual fields, such as email) of a given group or 
set of groups -- that could be used to send an email to a group of users, 
but would also have other uses.
 

>  
>
That is the way of an enterprise framework.
>
 
Note, web2py is no longer an "enterprise" framework (http://www.web2py.com/).  
;-)
 
Anthony
 

Reply via email to