Ask HN: How do I solve this?
I am trying to build an app where I want to give users an email id for ex: abc@xyz.com. I am then building a parser for emails received on that email.
My problem is I am not sure how I can do the following : - give each user a unique email id
Google app emails are expensive and hosting my own mail server is complex. Is there a better way to do this? Any service, tutorials, pointers will be helpful. Thanks
8 comments
[ 15.1 ms ] story [ 985 ms ] threadLamson: https://github.com/zedshaw/lamson
Previous HN discussion: https://news.ycombinator.com/item?id=612642
On that single email address you could parse for the unique email ids and then process as you intended to. Depending on your mail provider you could simply have a POP3 or IMAP client or a full featured SMTP / MTA server.
I use a similar trick when people ask me for an email address, it is typically some.person@example.com. Then if that source spams me, etc then I can easily block emails to some.person without affecting my "real" email which is simply mail@example.com.
Basically a catch all will send any emailaddress@yourdomain.com to the main email on that domain mail@yourdomain.com for example.
Once that is setup you don't generate the emailaddress portion, you can use anything on the fly. It's basically *@yourdomain.com automatically goes to mail@yourdomain.com where you could parse them. (you could also setup forwarding for this to another domain's email if you want.)
I have this setup on one of my domains to use for testing web applications on the fly with multiple email addresses.
Good luck with your project.