Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Receiving emails via SendGrid

Tags:

email

sendgrid

How do I use sendgrid to receive email and then be able to reply to that email from our domain? Like someone sends an email to [email protected] and we reply via [email protected].

like image 479
cdub Avatar asked Sep 12 '12 21:09

cdub


1 Answers

Take a look at this sample PHP application, the parseListener.php script in particular. It looks at the text of the email, rolls an arbitrary number of dice based on that text, and then responds to the requester with that many dice rolls.

In order to do something like this, you'll need to deploy that script somewhere accessible to the internet (a hosting company that supports PHP for example), update the code to use your SendGrid username and password, and then configure the SendGrid Parse Webhook to be pointed to the script, e.g. http://example.com/webhooks/parseListener.php

like image 164
bwest Avatar answered Sep 23 '22 04:09

bwest