java - Reading new messages from multiple mail providers -
i working on solution in java need read new messages different email accounts (accounts different email providers).
the current approach follow running cron job open these email accounts , run loop on inbox new emails system.
is there best practice solution available kind of scenario?
it more elegant to make code handle 1 mailbox, , make configurations come properties file.
-create properties file each mailbox configurations (protocol / server / account / password etc)
-create cron each mailbox properties file in classpath.
this way, easier maintain: -you have easy way remove or add new mailboxes without rewrite code, -easy handle issues- seperete log file each mailbox, -everything more simple (no need think multithreading)
Comments
Post a Comment