Using SendGrid on Bluemix is as easy as sending an email

5 min read

Using SendGrid on Bluemix is as easy as sending an email

Here’s an interesting scenario. You’ve created a mobile app that allows users to reserve campsite space at any national or state park in the US. Literally tens of thousands of travelers and campers are using your app at once. How would you email them if inclement weather or a forest fire were affecting the park where they have reservations? For Bluemix developers, that answer is simple: SendGrid.


SendGrid: Bluemix’s email solution

SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. Their goal is to make it as easy as possible to add reliable, scalable email to your application so that you can focus on building the core features of your product. At Bluemix, our goal is to make it as easy as possible to build apps using great services!

As a developer, you don’t have time to recreate the wheel. That’s what so great about APIs. They allow you to add features to your app so you can focus on the code. Access to cloud-based development platforms and infrastructure solutions like email delivery from SendGrid helps removes the complexity of building and maintaining fundamental services so that developers can focus on innovating their own product.

When it comes to a standard feature like email, the SendGrid API is the email solution many developers turn to. SendGrid on Bluemix means that Bluemix developers have this email feature available at their fingertips. And the SendGrid service is scalable, so it can handle billions of emails a day.

Discover SendGrid on Bluemix

Follow these steps to add SendGrid’s email service to your Bluemix-built app:

    1. First, if you don’t already have one, you’ll need to sign up for a IBM Bluemix account. There’s a free 30-day trial you can sign up for at the Bluemix web site.

    2. After you confirm your account log in, you will be prompted to create an organization and a space for your account. An organization is essentially the name of your project for whatever you are creating with Bluemix and spaces are different aspects and resources for that project. You can have different applications, resources, and permissions in multiple spaces.

      log in
    3. Once you’ve finished naming your organization and space, you will be taken to your dashboard. From here you can navigate throughout your Bluemix account. You can create additional spaces, add applications and tools as well as update your account information.

    4. To get signed up with SendGrid you want to navigate to catalog at the top of your dashboard and that will take you to a page with a whole lot of options to add to your account. SendGrid is located in the Web and Application section and you can also search for it with the search bar up top.

      signed up
    5. Once you’ve selected SendGrid, you will be taken to a page where you can select the plan you wish to be on and see the features offered. You will also assign SendGrid to one of your spaces and can look at Docs. There is not a free offering with Bluemix so you have to choose a paid plan which will require you to enter a credit card.

    6. The package options with SendGrid are Bronze $9.95, Silver $79.95, Gold $199.95 and Platinum $399.95. Legacy newsletter is available on Silver and higher plans, and the packages do allow for overages.

    7. Once your account is created you will see a new section on your dashboard labeled services. Your SendGrid account is located there with which plan you are subscribed to.

    8. Clicking the SendGrid application takes you to a page that gives you the option to Open SendGrid Dashboard. This takes you to your SendGrid account.

    9. By default, all newly created Bluemix/SendGrid accounts are automatically suspended. This is to combat a high volume of malicious email accounts that have been created through Bluemix. This is effectively a way to provision and approve the account before allowing users to just start sending out blasts of malicious email. A Bluemix user will need to reach out to SendGrid support to have their account reviewed and approved before they are able to send. They will see the standard red banner at the top of their SendGrid account notifying them of the suspension, however this does not specify that they need to reach out to support, it just asks to respond to an email sent out. It is worth noting that an email is not sent out. There is also no warning within Bluemix of the account being suspended, so hopefully the customer’s instinct is to reach out to support to get the account activated. It should also be noted that the email address SendGrid specifies that the message will be sent to is not something the customer has access to. They can change the contact email address in Account Details, but we still will not send out an email about their suspension.

    10. Once the account is activated, you will be able to use the account normally either through the SendGrid portal or if you set it up with a deployed application in your Bluemix account.

    11. To upgrade your account or change your credentials with Bluemix, you will need to do it through their command-line interface. We’ve added the steps below laying out how to change your service plan through Bluemix’s CLI.

      1. Install the Cloud Foundry command-line interface

      2. Login to your org/space:

        cf login -a api.<region, ie, ng, eu-gb or au-syd> -u <userid> -o <org> -s <space> -p <password>
      3. Display current services:

        cf services
        cf service <service-name>
      4. Update service plan:

        cf update-service <service-name> -p <new plan>
      5. It’s not required to rebind (including unbind->bind again) the app, if an app or apps is already bound to the service.

In addition, Bluemix offers some helpful tips on how to use the CLI. To get help and proper commands using their documentation just go to You can use the documentation to troubleshoot your issues.

That’s it! You’ve now added email capabilities to your Bluemix-built app. Now you can communicate with all the campers and visitors to National Parks arming them with knowledge about the park of their destination! Pretty cool!

For more information about Bluemix, SendGrid and dozens of other excellent APIs (think Watson!), go to the Bluemix website. Discover what you can build using Bluemix!

Sign up for Bluemix. It’s free!

Be the first to hear about news, product updates, and innovation from IBM Cloud