I have three applications all of which have mail functionality. Since this
gives a lot of dupliacte code I thought of moving all mail functionality
to its own mail application.

I have one masterapp controlpanel with the following code;

if not request.env.remote_addr in ['127.0.0.1', 'localhost']:
    response.cookies[response.session_id_name]['domain'] = ".mydomain.org"


to which the other apps connect:

session.connect(request, response, masterapp="controlpanel")


the other apps already use the following code to check if a user is logged 
in:

if 'auth' in globals() and auth.is_logged_in():


At the moment all apps have the following setting:

mail = auth.settings.mailer


Is it possible to only have this code in the controlpanel application and 
have
the other apps check;

if 'mail' in globals():

and then use 'mail' to send mail?


Kind regards,

Annet

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/69a482ba-d468-4c76-9562-e25bdf47fbcc%40googlegroups.com.

Reply via email to