SendGrid integration for RedHat's OpenShift
Latest commit d0b5e58 Dec 9, 2013 @danielamihalache danielamihalache Merge pull request #2 from danielamihalache/AddEnvVariables
Add env variables and update readme file
Failed to load latest commit information.
libs Initial commit, from mariusrusu's repo Jan 14, 2013
misc Initial commit, from mariusrusu's repo Jan 14, 2013
php add env variables Dec 9, 2013 fix cr Dec 9, 2013

Sendgrid on OpenShift

This git repository helps you to send emails quickly and easily through SendGrid on OpenShift using PHP.

Running on OpenShift

Create an SendGrid account at

Create an account at and set up you local machine with the client tools.

Create a php-5.3 application (you can call your application whatever you want)

    rhc app create -a sendgrid -t php-5.3 --from-code git://

If --from-code is not recognized, update your rhc gem.

Application code will be in sendgrid (or whatever you named your application).

Create custom environment variables in OpenShift

   rhc set-env sendgrid_user=<username> sendgrid_password=<password> -a sendgrid

Set username and password based on what you used to sign up for a SendGrid account and use the application name used to create your app.

###Configuration### Configure php/send_email.php file with your information:

Update your email address, subject, text content and html content:

          setSubject('Subject goes here')->
          setText('Hello World!')->
          setHtml('Hello World!');

Then push the repo

    git add .
    git commit -m "my first commmit"
    git push

That's it, you can now checkout your application at:


For more details about SendGrid libray please read

You can create your Sendgrid Quickstart with other programming languages using the following examples: