B
Benedict Verheyen
Hi,
i get an "Unable to relay for" when trying to send an email from within
my network to an email address not on my domain.
I don't understand why it says "relaying" as i'm sending from an
internal domain user to an external user.
Email server is exchange 2003
See this trace
File "<stdin>", line 1, in <module>
File "C:\Python25\Lib\smtplib.py", line 695, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'(e-mail address removed)': (550, '5.7.1
Unable to relay for (e-mail address removed)')}
The smpt var is this:
smtp = smtplib.SMTP(server) where server is my mail server
I can mail to any user that is part of mydomain.be but as soon as i try
an external address, i get the "Unable to relay" message.
With a mail program it works but i need to be able to do it via code.
I thought that i would have to authenticate (smtp.login) to our mail
server but that didn't resolve the issue
Any idea how i could do this?
Thanks
Benedict
i get an "Unable to relay for" when trying to send an email from within
my network to an email address not on my domain.
I don't understand why it says "relaying" as i'm sending from an
internal domain user to an external user.
Email server is exchange 2003
See this trace
Traceback (most recent call last):>>> smtp.sendmail("(e-mail address removed)", ["(e-mail address removed)"], msg)
File "<stdin>", line 1, in <module>
File "C:\Python25\Lib\smtplib.py", line 695, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'(e-mail address removed)': (550, '5.7.1
Unable to relay for (e-mail address removed)')}
The smpt var is this:
smtp = smtplib.SMTP(server) where server is my mail server
I can mail to any user that is part of mydomain.be but as soon as i try
an external address, i get the "Unable to relay" message.
With a mail program it works but i need to be able to do it via code.
I thought that i would have to authenticate (smtp.login) to our mail
server but that didn't resolve the issue
Any idea how i could do this?
Thanks
Benedict