Thanks to visit codestin.com
Credit goes to github.com

Skip to content

laur-craciun/sendgrid-openshift-quickstart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 http://sendgrid.com/user/signup

Create an account at http://openshift.redhat.com/ and set up you local machine with the client tools.

Create a php-5.3 application (you can call your application whatever you want) and change into the application directory.

    rhc app create sendgrid php --from-code https://github.com/openshift/sendgrid-openshift-quickstart
    cd sendgrid

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

Update the username and password with your SendGrid credentials.

    $sendgrid = new SendGrid('<sendgrid_username>', '<sendgrid_password>');

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

    $mail->
          addTo('[email protected]')->
          setFrom('[email protected]')->
          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:

    http://sendgrid-$yournamespace.rhcloud.com

For more details about SendGrid libray please read http://sendgrid.com/docs/Code_Examples/php.html

You can create your Sendgrid Quickstart with other programming languages using the following examples: http://sendgrid.com/docs/Code_Examples/index.html

About

SendGrid integration for RedHat's OpenShift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published