On Aug 22, 7:07 pm, Ned Deily <n...@acm.org> wrote: > > The problem here is that gmail, like most modern mail services, requires > the use of an encrypted (SSL or TLS) connection for mail relaying so > that the required user name and password are not sent in the clear. The > logging SMTP handler uses the smtplib module from the standard module to > send mail and, when built properly, smtplib does support TLS. However, > the caller of smtplib does need to do some extra work in that case, i.e. > it needs to call the server object's starttls method at the right point > in the protocol handshaking. It's currently not done automatically in > smtplib and, unfortunately, there is no code in the logging smtp handler > to detect the need for and to call starttls (in response to a > 250-STARTTLS response to an EHLO). > > To make this work, either the logging module or, perhaps better, the > smptlib module needs to be smarter about this case. I didn't see an > open issue on the Python bug tracker about this; you might want to open > one. In the meantime, some options would be to find an SMTP mail host > that doesn't require TLS. Or write a custom logger. Or on OS X it's > not *too* difficult to set up a local host mailer using the > Apple-supplied prefix that would accept mail locally and forward it to a > more sophisticated remote mailer. > > -- > Ned Deily, > n...@acm.org- Hide quoted text - > > - Show quoted text -
Thanks for the excellent and informative response :-). I'll investigate further, as you suggested, now that I understand what is happening. Bev in TX -- http://mail.python.org/mailman/listinfo/python-list