On 31 Mar 2006 18:20:27 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In using a simple smtp routine: > > # begin example > >>> import smtplib > >>> server = smtplib.SMTP('outgoing.verizon.net') > >>> server.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', > """To: [EMAIL PROTECTED] > From: [EMAIL PROTECTED] > Subject: Shakespeare Quote > > Tis like the breath of an unfeed lawyer... > """) > >>> server.quit() > # end example > > I find the following error: > > raise SMTPSenderRefused(code, resp, from_addr) > smtplib.SMTPSenderRefused: (550, '5.7.1 Authentication Required', > '[EMAIL PROTECTED]') > > > I have attempted to incorporate into the interactive session: > > server.login = ('userid', 'password') # the same ones I use in my > email program
I had some trouble with this not too long ago. I don't know what kind of authentication your mail server requires, but to send through gmail I had to do the following. s = smtplib.SMTP('smtp.gmail.com') s.set_debuglevel(1) s.ehlo() s.starttls() s.ehlo() s.login('foo', 'bar') s.sendmail(from_address, to_addresses, msg) s.close() Hope that helps. -- Stand Fast, tjg. -- http://mail.python.org/mailman/listinfo/python-list