We have a large collection of email messages written over the years on a discussion mailing list. They're in an .mbox file, but could be converted to another format if needed.
We'd like to publish those old mail messages as an archive of WordPress posts (one post per mail message). It would also be a good idea to have mail addresses in those messages hidden to avoid spam. How could this be accomplished?
Importing email as post seems very unusual. Try reconsidering it and think about:
If you must do it:
I would recommend using WP All Imports plugin. The data must be in either XML or CSV. It might also support XLS. You should convert it to one of those format before you can import the data as posts.
Word of warning with CSV: because CSV is a Comma Separated any comma in your email (which is very common), will break the layout of CSV. Easiest way to get around this is to use a separator other than comma; you can use a combination of characters which will be very uncommon in email.
Example: Instead of using something like following:
Try using:
You can then specify your separator in WP ALL IMPORTS when importing.