help with parsing email

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Aug 19 04:36:03 CEST 2008


En Mon, 18 Aug 2008 12:24:07 -0300, Ahmed, Shakir <shahmed at sfwmd.gov> escribió:

> Thanks everyone who tried to help me to parse incoming email from an exchange server:
>
> Now, I am getting following error; I am not sure where I am doing wrong. I appreciate any help how to resolve this error and extract emails from an exchange server.
>
>
> First I tried:
>>>> mailserver = 'EXCHVS01.my.org'
>>>> mailuser = 'myname'
>>>> mailpasswd = 'mypass'
>>>> mailserver = poplib.POP3(mailserver)
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "C:\Python24\lib\poplib.py", line 96, in __init__
>     raise socket.error, msg
> error: (10061, 'Connection refused')

The code looks right - this isn't a Python problem. Ask your administrator, or look into your Outlook configuration and try to reproduce exactly those settings, including server name and port.

>>>> mailserver = 'pop.EXCHVS01.ad.my.org'
>>>> mailuser = 'myname at my.org'
>>>> mailpasswd = 'mypass'
>>>> mailserver = poplib.POP3(mailserver)
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "C:\Python24\lib\poplib.py", line 84, in __init__
>     for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
> gaierror: (11001, 'getaddrinfo failed')

Probably pop.EXCHVS01.ad.my.org doesn't exist.

-- 
Gabriel Genellina




More information about the Python-list mailing list