On Wednesday, May 22, 2013 4:35:14 AM UTC+8, Matteo Landi wrote:
>
>
> I like the idea of keeping in the framework only the necessary 
> modules, however I see a potential issue in _blindly_ following this 
> strategy.  Let's take the email api as an example:  it is just a tiny 
> wrapper around the Python api, nothing more, so why should it be kept 
> in the framework?  In my opinion (please correct me if wrong), that 
> module is there (and hope will last) to create a common interface 
> handy to create pluggable extensions: do you want to create and share 
> an extension which at some point needs to send an email?  Easy, use 
> ``web.sendmail`` and you are done.  Without that common interface this 
> would not be possible. 
>


Let's make it simpler here.

*) web.sendmail() is used to mail "internal server error" message to
specified email address(es) in web.py, do you need this feature?

[used in module debugerror.py, function emailerrors() if you don't want
to check source code.]

*) If you just use web.sendmail() to send plain email without attachment,
smtplib is as easy as web.sendmail(). But if you want to send attachment,
i bet you will wrap smtplib+email modules in your own function.

Personally, i let my web.py application mail me "internal server error"
message automatically when error occurs, on production server.

[code i use, if you're curious:
app.internalerror = web.emailerrors('[email protected]', 
web.webapi._InternalError)
]

Keeping or removing web.sendmail() is not a big deal, but it's really handy.
I guess most users will vote for keeping it in core. :)

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to