Re: Clear interface for mail class

2009-10-15 Thread Benedict Verheyen
Francesco Bochicchio wrote: snip I would add a server class, maybe subclassing something in standard library, and add to it the 'send' method, so that sending a mail would be something like: myserver = MyMailServer(mysmtpserver, localhost, ) # this only needs to be done once, not for

Clear interface for mail class

2009-10-14 Thread Benedict Verheyen
Hi, I'm trying to come up with a decent interface for my email class. Basically, i have one email function but it has many (too many?) variables: send_mail(self, send_from, send_to, send_cc, subject, text, separate_emails = False, files=[], inline_files=[], server=localhost,

Re: Clear interface for mail class

2009-10-14 Thread Marco Mariani
Benedict Verheyen wrote: Any ideas are welcome. easy_install turbomail :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Clear interface for mail class

2009-10-14 Thread Benedict Verheyen
Marco Mariani wrote: Benedict Verheyen wrote: Any ideas are welcome. easy_install turbomail :) Looks good but i'm still interested in how one would make a clean class interface for this type of problem. Having said that, turbomail looks quite good :) Thanks --

Re: Clear interface for mail class

2009-10-14 Thread Joe Riopel
On Wed, Oct 14, 2009 at 8:39 AM, Benedict Verheyen benedict.verhe...@gmail.com wrote: This kind of problems seems to happen sometimes: i need to fix something quickly, build a script for it, and then i realise that the code i've written is not the best in terms of reusability and has some

Re: Clear interface for mail class

2009-10-14 Thread Francesco Bochicchio
On Oct 14, 2:39 pm, Benedict Verheyen benedict.verhe...@gmail.com wrote: Hi, I'm trying to come up with a decent interface for my email class. Basically, i have one email function but it has many (too many?) variables:     send_mail(self, send_from, send_to, send_cc, subject, text,