I have a node.js app that uses the sendgrid api to send emails.
I want people to be able to reply to those, and then forward the reply to another email. E.G:
bleep@bleep.com
sends automated email to blop@blop.com
.
blop replies, "hello",
and I want the email containing "hello" to be forwarded to another email, such as recieving@bleep.com.
(Or something like that)
I have done some research and all I can find is using parse webhooks
(whatever those are :] ) to send POST requests to a server when an inbound email is detected.
What I dont understand is why (if you can do that), you cant simply forward it to another email.
If there is no way to forward them, is there some node module that could accept the POST request and then forward it? Thank you in advance!
Use the "reply_to" from SendGrid.
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header 'Authorization: Bearer <<YOUR_API_KEY>>' \
--header 'Content-Type: application/json' \
--data '{"personalizations":[{"to":[{"email":"john.doe@example.com","name":"John Doe"}],"subject":"Hello, World!"}],"content": [{"type": "text/plain", "value": "Heya!"}],"from":{"email":"sam.smith@example.com","name":"Sam Smith"},"reply_to":{"email":"sam.smith@example.com","name":"Sam Smith"}}'
reply_to
to "a@example.com".