smtplib

Steve Holden sholden at bellatlantic.net
Mon Jun 26 23:47:35 EDT 2000


Peter Timaratz wrote:
> 
> As a kindness to all the idiots like me perhaps this intro can be added to
> the smtplib module:

You aren't an idiot.  You are just a little disappointed that SMTP is
only a protocol, and you still have to prepare RFC822-structured messages.

However, there are the likes of the "mimecntl" module (available from
the starship last time I wanted it) which allows you to construct messages
you can edit the headers in, attach files, and anything else the aspirant
Pythin mail hacker might want.  Quite powerful enough to, for example,
take four years' e-mail and index it all in a SQL Server 7 relational
database.

> 
> "This module implements SMTP and does not send e-mail. If you want to send
> e-mail with Python then learn SMTP. If you don't want to learn SMTP then you
> can use one of the many Perl modules available that don't require you to
> know SMTP."
> 
Well, I might argue that since smtplib implements the protocol you don't
need to learn it, only the API offered by smtplib (one of many possible
APIs to the RFC 821 SMTP protocol).  But your remarks about Perl might be
considered inflammatory in a less well-mannered newsgroup.  Fortunately
the average Pythonista is a gregarious type, and rarely attacks even
trolls :-)

> > -----Original Message-----
> > From: python-list-admin at python.org
> > [mailto:python-list-admin at python.org]On Behalf Of Grant Edwards
> > Sent: Monday, June 26, 2000 10:09 AM
> > To: python-list at python.org
> > Subject: Re: smtplib
> >
> >
> > In article <001501bfdf74$6dff1fe0$14b745c6 at timaratz>, Peter
> > Timaratz wrote:
> >
> > >Yes, I figured out that smtplib requires the subject and
> > >headers to be imbedded in the message. I'm new to Python and I
> > >love the language. But I think that the design of this module
> > >reflects poorly upon Python.
> >
> > The module impliments SMTP, hence the name.  SMTP does not
> > concern itself with message contents.  Writing smtplib to make
> > certain assumptions or force certain conventions regarding
> > message content would be just plain incorrect.
> >
Which isn't to say this is the only possible approach.

> > >Almost every CGI programmer who looks at Python will want to
> > >use this module. It would only take a few lines of code to make
> > >it much more usable.
> >
> > Maybe you should write a higher level e-mail module that does
> > what you are requesting.  It does not belong in smtplib.
> >
> > >I'm saying this not to flame Python, but to encourage those
> > >responsible for it's distribution to look more critically at
> > >what they are putting out.
> >
A noble cause.  I would say that "those responsible" are pretty
open to reasonable suggestions, so don't let this stop you from
saying what els eneeds fixing.  But expect them to argue back
when they donlt think anything is broken!

> > Perhaps you should look more critically at what you expect from
> > a library that claims only to impliment SMTP.  If you want a
> > layer of functionality on _top_ of SMTP, then that's something
> > another module can impliment.
> >
> > >I hope that this module is atypical of the quality of this
> > >product. I'd like to see Python become more popular. There are
> > >many factors involved in that, but the quality of the modules
> > >is certainly one of them.
> >
> > There is nothing wrong with smtplib.  You seem to be expecting
> > it to do things other than SMTP.
> >
> > --
> > Grant Edwards                   grante             Yow!  I'm an East Side
> >                                   at               TYPE...
> >                                visi.com
> > --
> > http://www.python.org/mailman/listinfo/python-list
> >
regards
Steve Holden
-- 
Helping people meet their information needs with training and technology.
703 967 0887   sholden at bellatlantic.net   http://home.cox.rr.com/sholden/



More information about the Python-list mailing list