SMTPlib Sender Refused?

reed reedobrien at gmail.com
Sat Jun 2 18:16:57 EDT 2007


On Jun 2, 1:20 pm, erikcw <erikwickst... at gmail.com> wrote:
> Hi,
>
> I'm trying to send an email message with python, and I'm getting this
> error:
>
> Traceback (most recent call last):
>   File "wa.py", line 430, in ?
>     main()
>   File "wa.py", line 425, in main
>     smtp.sendmail(fromaddr, to, msg.encode('utf-8'))
>   File "/usr/local/lib/python2.4/smtplib.py", line 680, in sendmail
>     raise SMTPSenderRefused(code, resp, from_addr)
> smtplib.SMTPSenderRefused: (503, 'sender already given',
> '... at mydomain.com')
>
> What is causing this?
>
> Thanks!
> Erik

This error is given when the MAIL command has already been sent.

Usually this is indicative of some command failing (maybe invalid rcpt
to:??) and retrying without sending the RSET command.

Try connecting manually and see what you get.

~r




More information about the Python-list mailing list