help using smtplib to work ..

Tim Williams tim at
Thu Nov 9 01:38:24 CET 2006

On 09/11/06, Nicolas G <nicolasg at> wrote:
> >
> > Usually when sending/relaying without authentication,  the From is
> > irrelevant, only the To is taken into account.  Maybe, GMAIL do
> > something different because they have to put the mail in the sender's
> > mailbox as well as the recipient's.   Some ISPs will only allow a
> > local FROM address though.
> >
> > As we're only talking about the envelope TO & FROM, you could try no
> > FROM address (None or <> I forget which Smtplib needs) .
> If I left From empty I don't get any error but I still don't receive any
> message.
> >  The header FROM can still have the real FROM address in it, as its not
> (normally)
> > used during SMTP relaying.
> How you can explain that only for some address in the From field I can
> receive mails' and from others I can't ?
> It looks really weird to me...

It must be down to how gmail's server(s) work.

> Other question : Suppose I use the login procedure, the password will be
> vulnerable to attacks ? If I'm right I think when no ssl is used for
> authentication some one can easy see the password just by sniffing the
> packets.

I think the risk is low to be honest.   However, uses
TLS (SSL) on ports 465 or 587.   You can call STARTTLS from within
smtplib.  but TrevorP's TLS-lite extensions to smtplib handle it


More information about the Python-list mailing list