User Profile
Collapse
-
Perfect, that worked! Thank you for your assistance! -
So there is no graceful way to prevent the program from blowing up when an attempt is made using smtplib to connect on port 25 to a device that has no listener on that port?Leave a comment:
-
Sorry about that, I will do so!
The address in line 1 does not have an SMTP server running, I am testing my code for error trapping when the server won't respond. If I change the IP address to one that is running an SMTP server, then the code runs fine.Leave a comment:
-
I ran a sniffer trace and I am not getting the typical 'TCP RST' from a refused connection. I am getting an ICMP type 3 code 10 - destination unreachable, host administrativel y prohibited.Leave a comment:
-
having trouble suppressing traceback on socket.error
My python program is calling smtplib.sendmai l which ultimately calls socket.py to open port 25 on the specified host. My issue is that if an error is raised on that attempted socket connection, I can't seem to catch the exception and handle it gracefully - I get the traceback. 'except socket.error:' is being bypassed for some reason that I can't figure out. Thoughts on what I am doing wrong? Thanks!
Code:s = smtplib.SMTP('10.255.208.122')
Last edited by Rabbit; Nov 12 '13, 11:43 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: