Is it possible to setup Griddler + Sendgrid to only be used for a single email address?

70 views Asked by At

Want to use Griddler for uploading attachments etc in my rails app but only want a certain email address to be forwarded to my rails app is this possible cant find and docs on this as an option

1

There are 1 answers

0
Marcus Salinas On

I don't believe there is from the SendGrid side of the workflow, but you can always in your Rails application look at the To tag in the email object and see if it matches the email you'd like.

class EmailProcessor
  def initialize(email)
    @email = email
  end

  def process
    if @email.to == '[email protected]'
      # do something
    else
      # handle invalid email
    end 
  end
end