File tree Expand file tree Collapse file tree
projects/Store_emails_in_csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,13 +17,20 @@ for extracting text from HTML messages.
1717You will need to have a file ` credentials.txt `
1818with your IMAP server account name and password on separate lines.
1919
20- This generates ` mails.csv ` in the current directory.
20+ Gmail - and many other IMAP providers -
21+ requires you to create a separate "application password"
22+ to allow this code to run, so probably do that first.
23+ Then put that password in ` credentials.txt ` .
24+
25+ Then simply run
2126
2227```
2328python store_emails.py
2429```
2530
26- The generate CSV file contains the following fields for each message:
31+ This generates ` mails.csv ` in the current directory.
32+
33+ The generated CSV file contains the following fields for each message:
2734
2835* Date
2936* From (Sender)
@@ -48,6 +55,8 @@ arrived since the previous poll.
4855It might be useful to be able to specify which messages to fetch,
4956instead of have it fetch everything every time.
5057
58+ The exception handling is not a good example of how to do this properly.
59+
5160
5261## Author Name
5362
You can’t perform that action at this time.
0 commit comments