On our website we use a MySQL table which contains all users. Some of the users should be able to send mails to all users. Unfortunately I haven't got the right idea how to implement such a system.
My current design:
- A privileged user writes a mail to
users@website.com
using his personal mail software. - A server is waiting for incoming mails.
- As soon as it receives a mail, it matches the 'From' field with the database.
- If the user is not found or hasn't got the special flag, discard the mail.
- Forward the mail to all users (mail addresses are saved in the database)
- Send the sender a confirmation mail.
How can I implement such a system? I'm not required to stick to a certain programming language even though C++, PHP or Node.JS would be preferred.