carl crott
carl crott

Reputation: 753

Accepting emails into a Heroku hosted application

ive got a email setup to forward to mx.sendgrid.new (the sendgrid mail server) then with received emails sendgrid passes them to a specified page (as shown in the 2nd image of the tutorial im following)

http://nanceskitchen.com/2010/02/21/accept-incoming-emails-into-a-heroku-app-using-sendgrid/#comment-37

SO what CODE is inside that index file that passes the sendgrid email into the controller

is it just like a regular form page...?

Upvotes: 1

Views: 336

Answers (2)

DougB
DougB

Reputation: 674

There is no index file, just a post request to your application made from SendGrid. You specify the url you want that post to go to, and when SendGrid receives an email, it posts a request to your specified URL, with the email fields as parameters.

PS. NancesKitchen.com is my blog.

Upvotes: 1

tfe
tfe

Reputation: 34982

There should be no index file (as in a static HTML or view file) involved.

Sendgrid makes the request to your app on a given URL. From your app's side, this request is handled straight by the controller. But instead of the params hash being populated by form data, it's populated by the data in the request from Sendgrid.

Upvotes: 0

Related Questions