Hi,
Do you notice when receive a comment on Trello via email, you just need to reply that comment so your reply can appear on the board. This function is also available on Upwork in which I just need to reply an email to reply a message.
I wonder if you implemented this function, how would you do it? What kind of knowledge that I have to learn to do this? Do I have to mess around with mail server?
I am good at PHP and its frameworks, but willing to learn anything new.
Thanks everyone.
Ruby on Rails has this functionality built-in:
https://guides.rubyonrails.org/action_mailbox_basics.html
You've received some other suggestions for services like Postmark and Mailgun which are both valid (you'll need a service to receive the mail!) but that's only half the story. So you receive a webhook... now what?
Rails is awesome precisely because it has answers for this sort of question.
You're absolutely right. I will def look into Rails for this. Postmark and Mailgun send data via HTTP so I guess most web programming languages can handle the response.
I’d be concerned if any modern language stack couldn’t receive a web request! That’s not the point. Receiving an email from a service is the beginning of your task, not the end.
yeah, that's true. Mailgun just saves from the task of setting up a mail server.
Check out Postmark which can help with this.
thank you. How about inbound emails? do you have any recommendation?
Yep, with Postmark you can wire up the email to a web hook.
https://postmarkapp.com/support/inbound-emails
You make an end point in your app that receives a POST from Postmark with the email payload.
Awesome. Thank you so much
I would use a service like Mailgun[1], which can receive email for an entire domain (I would use a new domain just for this - if my main is "foo", I'd use something like "foomail.com") and on receipt of an email, parses the email out into JSON and can make a webhook/POST to my back end.
The reply-to address (and probably the sent as well) would be something like <messageid>@foomail.com - where the messageid is the unique id of the message thread. You could encode quite a bit more data in there as well and just base-64/hex it.
On receipt of the webhook/POST, you'd look up the message based on the "receiver" email address, try to find a user based on the "sender" email id, and from there it is more or less the same code as an HTTP comment.
Oh, you'd have to have a bit of clever parsing of the email body to extract out the reply vs. the quoted bits, and/or convert them into whatever format your commenting system might use for quotes.
This should be covered by the free tier on mailgun.
[1] https://documentation.mailgun.com/en/latest/quickstart-receiving.html#how-to-start-receiving-inbound-email
Hey, thank you for your detailed suggestion. It seems that this task is possible without going into the world of mail server. I will try this out. By the way, I read the post about your idea. Sound very interesting!