88
99# mail-parser
1010
11- ## Overview
12-
1311mail-parser is not only a wrapper for [ email] ( https://docs.python.org/2/library/email.message.html ) Python Standard Library.
1412It give you an easy way to pass from raw mail to Python object that you can use in your code.
1513It's the key module of [ SpamScope] ( https://github.com/SpamScope/spamscope ) .
@@ -28,15 +26,29 @@ $ apt-cache show libemail-outlook-message-perl
2826
2927mail-parser supports Python 3.
3028
31- ## mail-parser on Web
29+
30+ # Apache 2 Open Source License
31+ mail-parser can be downloaded, used, and modified free of charge. It is available under the Apache 2 license.
32+
33+ If you want support the project:
34+
35+
36+ [ ![ Donate] ( https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif " Donate ")] ( https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VEPXYP745KJF2 )
37+
38+ ![ Bitcoin Donate] ( https://i.stack.imgur.com/MnQ6V.png )
39+
40+ ![ ] ( https://github.com/SpamScope/mail-parser/raw/develop/docs/bitcoin-qrcode.png )
41+
42+
43+ # mail-parser on Web
3244 - [ Splunk app] ( https://splunkbase.splunk.com/app/4129/ )
3345 - [ FreeBSD port] ( https://www.freshports.org/mail/py-mail-parser/ )
3446 - [ Arch User Repository] ( https://aur.archlinux.org/packages/mailparser/ )
3547
3648
37- ## Description
49+ # Description
3850
39- mail-parser takes as input a raw email and generates a parsed object. The properties of this object are the same name of
51+ mail-parser takes as input a raw email and generates a parsed object. The properties of this object are the same name of
4052[ RFC headers] ( https://www.iana.org/assignments/message-headers/message-headers.xhtml ) :
4153
4254 - bcc
@@ -107,27 +119,18 @@ $ mail.to_raw (raw header)
107119
108120The command line tool use the JSON format.
109121
110- ### Defects
122+ ## Defects
111123These defects can be used to evade the antispam filter. An example are the mails with a malformed boundary that can hide a not legitimate epilogue (often malware).
112124This library can take these epilogues.
113125
114126
115- ### Apache 2 Open Source License
116- mail-parser can be downloaded, used, and modified free of charge. It is available under the Apache 2 license.
117-
118- If you want support the project:
119-
120-
121- [ ![ Donate] ( https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif " Donate ")] ( https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VEPXYP745KJF2 )
122-
123-
124- ## Authors
127+ # Authors
125128
126- ### Main Author
129+ ## Main Author
127130** Fedele Mantuano** : [ LinkedIn] ( https://www.linkedin.com/in/fmantuano/ )
128131
129132
130- ## Installation
133+ # Installation
131134
132135Clone repository
133136
@@ -149,7 +152,7 @@ or use `pip`:
149152$ pip install mail-parser
150153```
151154
152- ## Usage in a project
155+ # Usage in a project
153156
154157Import ` mailparser ` module:
155158
@@ -196,7 +199,7 @@ It's possible to write the attachments on disk with the method:
196199mail.write_attachments(base_path)
197200```
198201
199- ## Usage from command-line
202+ # Usage from command-line
200203
201204If you installed mailparser with ` pip ` or ` setup.py ` you can use it with command-line.
202205
@@ -216,7 +219,7 @@ optional arguments:
216219 -s STRING, --string STRING
217220 Raw email string (default: None)
218221 -k, --stdin Enable parsing from stdin (default: False)
219- -l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}, --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}
222+ -l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}, --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}
220223 Set log level (default: WARNING)
221224 -j, --json Show the JSON of parsed mail (default: False)
222225 -b, --body Print the body of mail (default: False)
@@ -253,11 +256,11 @@ $ mailparser -f example_mail -j
253256
254257This example will show you the tokenized mail in a JSON pretty format.
255258
256- From [ raw mail] ( https://gist.github.com/fedelemantuano/5dd702004c25a46b2bd60de21e67458e ) to
259+ From [ raw mail] ( https://gist.github.com/fedelemantuano/5dd702004c25a46b2bd60de21e67458e ) to
257260[ parsed mail] ( https://gist.github.com/fedelemantuano/e958aa2813c898db9d2d09469db8e6f6 ) .
258261
259262
260- ## Exceptions
263+ # Exceptions
261264
262265Exceptions hierarchy of mail-parser:
263266
0 commit comments