disposable-mailbox
disposable-mailbox copied to clipboard
Reply to email
Sometimes it is necessary to reply to an email in the mailbox. The function should be as simple as possible.
Requirements:
- Use built-in mail function http://php.net/manual/en/function.mail.php
- From, To and Subject can not be changed by the user (don't trust user input)
- To limit abuse: For each message, only one reply is allowed.
- The feature has to be explicitly enabled by the user (disabled by default).
- As few lines of code as possible, while keeping it simple.
Challenges:
- Where to persist that a message has replied to? So far the application is stateless. Hint: The Flag-Feature of imap could be used.
maybe #49 gives some clues.
You could check the state by scanning the catch-all's sent folder for anything sent from that user name. You would have to make sure that the catch-all is configured to send as any user name.