Is the following possible using Python?

  1. Given a directory with 500 emails in it. These are all bounced emails.
  2. Have script open 1st email
  3. Python extracts the failed email address (from body of email, not header or addressing)
  4. Script appends found email address to separate file of bad addresses
  5. Script does 2 thru 4 to the rest of the emails, untl they've all been harvested

Result is a single file with all the bad addresses.

It looks like the email pkg will do the parsing, but what module would be used to actually open the email from the directory itis sitting in?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.