On 08.10.2013 17:25, Antoon Pardon wrote:
Op 08-10-13 16:24, Andreas Perstinger schreef:
Looking at the docs, I've found there is also "message_from_binary_file"
which works for me with your code.
http://docs.python.org/3/library/email.parser.html#email.message_from_binary_file
I can't try t
Op 08-10-13 16:24, Andreas Perstinger schreef:
On 08.10.2013 14:20, Antoon Pardon wrote:
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a debian box I have the following code.
#!/usr/bin/python3
import s
On 08.10.2013 14:20, Antoon Pardon wrote:
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a debian box I have the following code.
#!/usr/bin/python3
import sys
from email import message_from_file
sys.stdi
I want to do some postprocessing on messages from a particular mailbox.
So I use getmail which will fetch the messages and feed them to stdin
of my program.
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a
aspineux wrote:
> Hello
>
> I have written part 2 about parsing email.
>
> You can find the article here :
>
> http://blog.magiksys.net/parsing-email-using-python-content
>
> This part is a lot longer :
Wow! Well done.
Thank you for sharing this, this is ex
aspineux wrote:
> Hope this help someone.
>
Yeah
I will learn alot and surely applying to my code.
Merci Beaucoup
--
goto /dev/null
--
http://mail.python.org/mailman/listinfo/python-list
Alain,
> I have written an article about parsing email using Python. The article is at
> http://blog.magiksys.net/Parsing-email-using-python-header
and the full content is here.
Very helpful - thank you!
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have written an article about parsing email using Python.
The article is at http://blog.magiksys.net/Parsing-email-using-python-header
and the full content is here.
Hope this help someone.
Regards.
A lot of programs and libraries commonly used to send emails
don't comply with RFC. I
Hi guys,
I use these codes to read emails from an IMAP server:
import imaplib
imap_srv_addr = "someserver"
imap_srv = imaplib.IMAP4_SSL(imap_srv_addr)
imap_srv.login("username","passwd")
imap_srv.select("Inbox")
msg = imap_srv.fetch(1, '(RFC822)')
How can I parse msg so it can be appended to th
T wrote:
> Thanks for your suggestions! Here's what seems to be working - it's
> basically the same thing I originally had, but first checks to see if
> the line is blank
>
> response, lines, bytes = M.retr(i+1)
> # For each line in message
> for li
Thanks for your suggestions! Here's what seems to be working - it's
basically the same thing I originally had, but first checks to see if
the line is blank
response, lines, bytes = M.retr(i+1)
# For each line in message
for line in lines:
T wrote:
On Mar 11, 3:13 pm, MRAB wrote:
T wrote:
All I'm looking to do is to download messages from a POP account and
retrieve the sender and subject from their headers. Right now I'm 95%
of the way there, except I can't seem to figure out how to *just* get
the headers. Problem is, certain
On Mar 11, 3:13 pm, MRAB wrote:
> T wrote:
> > All I'm looking to do is to download messages from a POP account and
> > retrieve the sender and subject from their headers. Right now I'm 95%
> > of the way there, except I can't seem to figure out how to *just* get
> > the headers. Problem is, cer
On 2010-03-11, T wrote:
> All I'm looking to do is to download messages from a POP account and
> retrieve the sender and subject from their headers. Right now I'm 95%
> of the way there, except I can't seem to figure out how to *just* get
> the headers.
The headers are saparated from the body by
T wrote:
All I'm looking to do is to download messages from a POP account and
retrieve the sender and subject from their headers. Right now I'm 95%
of the way there, except I can't seem to figure out how to *just* get
the headers. Problem is, certain email clients also include headers
in the me
All I'm looking to do is to download messages from a POP account and
retrieve the sender and subject from their headers. Right now I'm 95%
of the way there, except I can't seem to figure out how to *just* get
the headers. Problem is, certain email clients also include headers
in the message body
On Oct 4, 10:27 am, dpapathanasiou
wrote:
> I'm using python to access an email account via POP, then for each
> incoming message, save any attachments.
>
> This is the function which scans the message for attachments:
>
> def save_attachments (local_folder, msg_text):
> """Scan the email mess
On Sun, 2009-10-04 at 09:17 -0700, dpapathanasiou wrote:
> > Which is *really* difficult (for me) to read. Any chance of providing a
> > "normal" traceback?
>
> File "/opt/server/smtp/smtps.py", line 213, in handle
> email_replier.post_reply(recipient_mbox, ''.join(data))
> File "/opt/ser
> Which is *really* difficult (for me) to read. Any chance of providing a
> "normal" traceback?
File "/opt/server/smtp/smtps.py", line 213, in handle
email_replier.post_reply(recipient_mbox, ''.join(data))
File "/opt/server/smtp/email_replier.py", line 108, in post_reply
save_attachm
On Sun, 2009-10-04 at 08:16 -0700, dpapathanasiou wrote:
> > And where might we be able to see that stack trace?
>
> This is it:
>
> Exception: ('AttributeError', '', [' File "/opt/server/smtp/
> smtps.py", line 213, in handle\ne
> mail_replier.post_reply(recipient_mbox, \'\'.join(data))\n',
> And where might we be able to see that stack trace?
This is it:
Exception: ('AttributeError', '', [' File "/opt/server/smtp/
smtps.py", line 213, in handle\ne
mail_replier.post_reply(recipient_mbox, \'\'.join(data))\n', ' File "/
opt/server/smtp/email_replier.py", l
ine 108, in post_repl
On Sun, 2009-10-04 at 07:27 -0700, dpapathanasiou wrote:
> When I try to write the filedata to a file system folder, though, I
> get an AttributeError in the stack trace.
And where might we be able to see that stack trace?
-a
--
http://mail.python.org/mailman/listinfo/python-list
I'm using python to access an email account via POP, then for each
incoming message, save any attachments.
This is the function which scans the message for attachments:
def save_attachments (local_folder, msg_text):
"""Scan the email message text and save the attachments (if any)
in the local
En Mon, 18 Aug 2008 12:24:07 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> 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
En Mon, 18 Aug 2008 12:24:07 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> 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
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Werner F. Bruhin
Sent: Monday, August 18, 2008 1:04 PM
To: python-list@python.org
Cc: [EMAIL PROTECTED]
Subject: Re: help with parsing email
Ahmed, Shakir wrote:
> Thanks everyone who tried to help me
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:
mai
but getting error
Thanks
sk
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Genellina
Sent: Monday, August 18, 2008 6:43 AM
To: python-list@python.org
Cc: [EMAIL PROTECTED]
Subject: Re: help with parsing email
En Thu, 14 Aug 2008 12:50:57 -0300, Ahmed,
Le Monday 18 August 2008 12:43:02 Gabriel Genellina, vous avez écrit :
> En Thu, 14 Aug 2008 12:50:57 -0300, Ahmed, Shakir <[EMAIL PROTECTED]>
escribió:
> > I need to grab/parse numeric numbers such as app number from incoming
> > emails stored in Microsoft Outlook (Microsoft Exchange server) with
En Thu, 14 Aug 2008 12:50:57 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> escribió:
> I need to grab/parse numeric numbers such as app number from incoming
> emails stored in Microsoft Outlook (Microsoft Exchange server) with
> specified subject line.
>
> The email body is like this
>
> myregion ; tst
Hi all,
I do appreciate if any one can help me for my following problem:
I need to grab/parse numeric numbers such as app number from incoming
emails stored in Microsoft Outlook (Microsoft Exchange server) with
specified subject line.
Any help with the python script is highly appreciat
On Thu, 2008-05-08 at 14:53 +0200, Aspersieman wrote:
> Hi
>
> I have a python script that parses email headers to extract information
> from them. I need to get the _last_ messageid in the 'References' field
> (http://cr.yp.to/immhf/thread.html) to create a threaded view of these
> emails (the
>
> "<.*>(<.*?>)"
>
Doesn't work if there is only one e-mail address:
Here's another one:
"<[^<]+>$"
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, May 8, 2008 at 2:53 PM, Aspersieman <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a python script that parses email headers to extract information
> from them. I need to get the _last_ messageid in the 'References' field
> (http://cr.yp.to/immhf/thread.html) to create a threaded view of these
Hi
I have a python script that parses email headers to extract information
from them. I need to get the _last_ messageid in the 'References' field
(http://cr.yp.to/immhf/thread.html) to create a threaded view of these
emails (these messageid's are stored in a database).
Now, I can easily acc
Thanks for the response.
The section of the email is an actual message fragment. The first blank line
that
appears in the message is immediately after the 1st
' boundary="m.182DA3C.BE6A21A3"'
There are no blank line prior to this in the message.
In the example that was snipped from
I think I faced same problem quite sometime back...
but in our case, due to some settings in Microsoft outlook , forwarded
emails were also coming as an attachment to email.
so That attachement itself has same format as email's format, so to
get information from attachment we needed to treat atta
En Fri, 21 Dec 2007 10:22:53 -0300, Steven Allport <[EMAIL PROTECTED]>
escribió:
> I am working on processing eml email message using the email module
> (python
> 2.5), on files exported from an Outlook PST file, to extract the
> composite
> parts of the email. In most instances this works f
I am working on processing eml email message using the email module (python
2.5), on files exported from an Outlook PST file, to extract the composite
parts of the email. In most instances this works fine, the message is read
in using message_from_file, is_multipart returns True and I can process e
39 matches
Mail list logo