问题描述:

For a user control panel that features a private message inbox, is it better to serve the private messages via a "real" email server or just store the messages in the database?

网友答案:

I would think this design decision depends heavily on how much connectivity you expect the user to have, how complicated / performant the proposed email server is to work with, and what your security requirements are for this project.

Relying on a real email server would probably be the simplest route if you can assume/require that the user will always be network connected. Talking to email servers, particularly with login credentials, can be a pain so find a good library to take care of the nitty gritty for you. Sorry, don't have any recommendations on libs.

Copying the emails into a local database will raise a lot of security flags - how do you keep that data private and ensure that it cannot be exploited by malicious software on the same machine? How do you keep multiple users sharing the same machine from seeing each other's emails? (use separate db's kept in user local storage). Etc.

However, copying to a local database could give you offline capabilities. If this would be a key feature, great, it's probably worth the headaches, but if offline ops are not key to your control don't toss it in on a whim.

相关阅读:
Top