I’m developing a PHP program to save all the emails received on an IMAP server.
I plan to divide the emails into three parts: header, body, and attachments.
Headers will be saved in a database like MySQL, attachments will be saved as text files, associated with the header’s Message-ID.
However, I’m unsure about the best way to handle the body.
I’m also considering implementing a mechanism to search through the email body, which makes it a bit tricky.
- Storing directly in an RDB like MySQL:
Isn’t it unsuitable to save large-sized data? - Saving as a txt file:
Considering full-text search, it seems inefficient.
There have been similar past. But they were answered several years ago, I’m posting this with the belief that there may be new technologies available.
I’d appreciate any good ideas or suggestions you might have.