I’m wondering how i would go about making the following application:
- a user signs up, say with the username “johny-jones”.
- Lets say for example that my domain is http://www.example.com
- if anyone emails johny-jones@example.com this email is redirected to johny-jones REAL email address
The simplest option is to tell your smtp server to forward all ingoing mails to an external program (your php script). For example, for qmail this will be like
| php myphpscript.phpin.qmailfile. Your script will read email from stdin and resend it to the real address.