RE: help with parsing email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ahmed, Shakir

    RE: help with parsing email



    -----Original Message-----
    From: python-list-bounces+shahmed =sfwmd.gov@pyth on.org
    [mailto:python-list-bounces+shahmed =sfwmd.gov@pyth on.org] On Behalf Of
    Werner F. Bruhin
    Sent: Monday, August 18, 2008 1:04 PM
    To: python-list@python.org
    Cc: python-win32@python.or g
    Subject: Re: help with parsing email

    Ahmed, Shakir wrote:
    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.or g'
    >>>mailuser = 'myname'
    >>>mailpasswd = 'mypass'
    >>>mailserver = poplib.POP3(mai lserver)
    Traceback (most recent call last):
    File "<interacti ve input>", line 1, in ?
    File "C:\Python24\li b\poplib.py", line 96, in __init__
    raise socket.error, msg
    error: (10061, 'Connection refused')



    The other way:
    >>>mailserver = 'pop.EXCHVS01.a d.my.org'
    >>>mailuser = 'myname@my.org'
    >>>mailpasswd = 'mypass'
    >>>mailserver = poplib.POP3(mai lserver)
    Traceback (most recent call last):
    File "<interacti ve input>", line 1, in ?
    File "C:\Python24\li b\poplib.py", line 84, in __init__
    for res in socket.getaddri nfo(self.host, self.port, 0,
    socket.SOCK_STR EAM):
    gaierror: (11001, 'getaddrinfo failed')
    Haven't used poplib myself, but was intrigued.

    Did you see this:
    The official home of the Python Programming Language


    To me it looks like you are not setting the user/password.

    So, maybe something like:

    M = poplib.POP3(mai lserver)
    M.user(mailuser )
    M.pass_(mailpas swd)
    .....

    Werner

    --

    but I am getting error before that point and could not go to the user
    account or pass.

    M = poplib.POP3(mai lserver)
    Traceback (most recent call last):
    File "<interacti ve input>", line 1, in ?
    File "C:\Python24\li b\poplib.py", line 96, in __init__
    raise socket.error, msg
    error: (10061, 'Connection refused')


Working...