3 ms·
What’s the easiest way to receive email programmatically without having to resort to a hosted service like SES? Is the SMTP protocol simple enough that it can b
by Onavo 2y ago
What’s the easiest way to receive email programmatically without having to resort to a hosted service like SES? Is the SMTP protocol simple enough that it can be implemented in for example a serverless lambda?
- jedberg 2y agoThe protocol is quite simple to implement. The tricky part is triggering the lambda and then holding the connection open long enough to get the message. You can’t trigger a lambda directly via tcp. You’d have to go through a gateway. That gateway would have to hold both sides of the connection open for a pretty long time. It would be tricky but doable.
- Onavo 2y agoWhat about a fly.io container?
- aforwardslash 2y agoThe easy answer is to use an smtp server; many languages have stable packages to implement that. You can also use postfix with procmail or exim - leave the smtp stuff to tried and true packages, and have your code receive messages either via maildir or direct scripting. The long answer is: first make sure you don't have a blacklisted IP; ask your cloud provider for permission to enable an MTA (mail transfer agent) and have fun seeing 99% of your email traffic being either brute force auth attempts or spam delivery attempts.
- kilroy123 2y agoFor my site https://aichat.email https://aichat.email this is how I do this: SendGrid Inbound Parse --> node.js server --> back to user
- patja 2y agoI didn't think SES received. It's just a sender. I run postfix.