
Ask HN: How would you go about building this? - chidog12
I want to build an email service where people can send an email to a specific email address. such as example@exampleapp.com.<p>Then I am able to continuously read new emails, read the info on a server, process the info make API calls then generate an accurate response and send the appropriate response.<p>Any help with an appropriate stack and technologies would be greatly appreciated.
======
PaulHoule
Some mail clients let you deliver mail to a script

[https://serverfault.com/questions/506894/how-to-route-
email-...](https://serverfault.com/questions/506894/how-to-route-email-to-a-
script/507024)

In that case you'd need to run a mail server where you install a script. I've
done it with qmail and postfix but I haven't run my own mail server for a long
time.

Another option is to use an existing mail server but write a script that polls
the mail server with POP or IMAP.

Today I'd consider doing it serverless with something like

[https://aws.amazon.com/about-aws/whats-
new/2019/02/trigger-a...](https://aws.amazon.com/about-aws/whats-
new/2019/02/trigger-actions-on-your-inbound-email-with-aws-lambda-for-amazon-
workmail/)

So far as the "stack" I would go with any mainstream platform, mostly driven
by what you like. You could certainly do this with Python, Java, .NET, etc.

------
mtmail
I'd use the inbound feature APIs of Mailgun/Sendgrid/Postmarkapp. They take
care of receiving and parsing and can call a URL on your server with new email
content. At least in the beginning you can concentrate on the business logic
("accurate response") and don't have to worry about character encodings,
parsing attachments or such.

~~~
sethammons
This is a perfect response. I'm biased towards SendGrid as I work there :)

You can totally do exactly what OP wants. Use the inbound parse webhook, get
mail forwarded to your HTTP webhook/endpoint, do whatever you want, and then
you can even reply using the email API of the provider. No reason to sweat the
mail server stuff.

~~~
chidog12
I appreciate the both of you. Will definitely jump on SendGrid and get
started.

