Setting Up Your Email Infrastructure With Twilio SendGrid

Setting Up Your Email Infrastructure With Twilio SendGrid

Chapter 1

Introduction

If you’ve decided that outsourcing your email infrastructure to a cloud-based solution like Twilio SendGrid is the right way to handle your organization’s email needs, that’s wonderful!

Luckily, Twilio SendGrid makes account creation and setup easy. In this guide, we’ll cover a few more decisions you’ll need to make about your email program. You’ll find:

  • Steps you should take when setting up your infrastructure
  • Next steps to take when you’re ready to send
  • Where you can go to get help if you need it

If you’re still evaluating the build vs. decision for your email infrastructure, not to worry, check out our guide, Your Guide to Email Infrastructure Build It or Buy It?. It offers a comprehensive look at all of the factors to consider when making this decision.

Up Next

How will you send email?

Chapter 2

Chapter 2

How will you send email?

Twilio SendGrid can be used in a few different ways depending on your business needs:

API

You can use Twilio SendGrid’s REST API to send emails programmatically. Our APIs are built on HTTP and return JSON for straightforward implementation.

Once you’ve created your account, you can use Twilio SendGrid’s API endpoint to request to send your email along with the contents of the message. Twilio SendGrid then processes the request and passes the message to the recipient’s inbox provider and gives you a response of whether the message was accepted or not.

Twilio SendGrid has optimized integration tools including open source libraries in 7 languages, interactive API reference, and clear setup flow so you can get your first email out in 5 minutes or less. We recommend senders use the API because it’s fast and easy to use. 

Learn more about integrating and using our API in the

API Documentation.
Email-Code

SMTP Relay

Unlike the API, when you use SMTP to connect to Twilio SendGrid, separate pieces of information must be passed back and forth between Twilio SendGrid and your servers before the message can be processed and sent to the recipient inbox provider.

While SMTP does take more time and has additional points of failure, it is also a standardized email protocol used universally. For customers who are unable to use the API, SMTP is a perfectly acceptable option.

Learn more about SMTP in our educational blog post, SMTP Service Crash Course.

Marketing Campaigns

Finally, if you’re sending an email to multiple recipients at the same time, you can use Twilio SendGrid’s user interface to upload contacts, design templates, schedule email campaigns, and send bulk emails for all-contact communications like privacy updates. Twilio SendGrid designed Marketing Campaigns so that marketers and developers alike can create the best marketing emails possible.

With all emails sent from the same platform, you eliminate the need to pull data from multiple places while also making your overall email program that much more streamlined.

To learn more about the basics of Marketing Campaigns, watch a demo of the platform, or, to get a more technical walkthrough, you can check out the Marketing Campaign’s User Guide.  

Up Next

Determining Your IP Needs

Chapter 3

Chapter 3

Determining Your IP Needs

Once you’ve decided how you’re going to integrate and use Twilio SendGrid, you’ll need to determine if you need a dedicated IP. Depending on the amount of email you’re going to send, more than one IP may be appropriate for your program.

Twilio SendGrid’s Pro Plan, ideal for businesses that send 100,000 and up to 1.5 million emails per month, offers a dedicated IP address.

Best Practice Tip:

A dedicated IP address allows you take responsibility for your sending reputation.


By being in control of your dedicated IP and your reputation, it's more likely that messages are delivered to recipient inboxes correctly.

All Twilio SendGrid email plans allow you to set up domain authentication and link branding. Senders using a dedicated IP can also implement reverse DNS for improved deliverability.

To learn how to set up domain authentication, link branding, and reverse DNS, please visit our article, How to Set Up Domain Authentication.

Up Next

Authentication Basics

Chapter 4

Chapter 4

Authentication Basics

Once you’ve established your email infrastructure, you need to authenticate your email. Email authentication encompasses all validation techniques you use to show inbox providers that the email coming from you is actually yours. The three most important authentication techniques you should use are:

Up Next

Warming Up Your Configuration

Chapter 5

Chapter 5

Warming Up Your Configuration

Not long ago, the concept of warm-up referred only to your IP address. Today, spam filters and inbox providers think about warm up in terms of your whole sending configuration. These days, when senders think about warm up, they have to consider their IP, DKIM, domain, from address, and even the content.

Inbox providers default to placing mail streams in the junk or spam folders to protect recipients. It’s important for all senders to go through a warm-up phase to introduce your IPs, domains, and your messages to inbox providers to show them that they’re legitimate and wanted.

Best Practice Tip:

To properly warm-up your new sending resource (IP, DKIM, domain), send a very small amount of traffic for the first several sends.


Start with your most engaged recipients and gradually increase volume from there. A very cautious warm-up shouldn’t take more than 30 days. An aggressive warm-up can be done in about 7.

Learn more about the IP warm-up process in our Email Guide for IP Warm Up.

Up Next

Segmenting Your Email

Chapter 6

Chapter 6

Segmenting Your Email

For senders who want to ensure their mail is delivered correctly, another step they can take is separating the types of email they’re sending into two buckets:

If you send all email from the same IP and the same “from” address, customers who unsubscribe from promotional emails (or report them as spam) may end up not receiving future receipts or password resets they want and need.

To prevent this from happening, you can create a subuser within your Twilio SendGrid account and then add another dedicated IP. By doing that, you can send all your promotional messages from your main account, and then all your transactional messages from a separate IP and subuser. You should also consider sending transactional messages from a different “from” address.

This easy separation of mail streams will keep your transactional mail reputation intact, and prevent recipients from unintentionally missing out on important messages. For more advanced senders, you can add as many subusers and IPs as you like so that even individual email campaigns are sent from their own IPs.  

Read about the latest in segmenting strategy in our guide,

The Essential Guide to Email Segmentation.
SG_EmailAutomation-Journey

Up Next

Address Collection

Chapter 7

Chapter 7

Address Collection

One of the biggest problems senders run into when beginning a new campaign is sending to a list of email addresses that they either purchased, used in previous businesses, crawled from social media, or have acquired from a partner, affiliate, or associate.

These practices can wreak havoc on your infrastructure because the people on those lists haven’t shown interest in your new email program, and they may find your email unwanted and intrusive.

Best Practice Tip:

Don't send email to people who don't want it or don't expect it.


Your email is a guest in your recipients’ inboxes. If you’re sending email to people who did not choose to receive your email, they will mark it as spam which will negatively impact your reputation. With a bad reputation, no matter how well you’ve set up your infrastructure or authenticated your email, you won’t get inboxed well.

The best thing to do is grow an email list from the ground up and set expectations as you go. Learn more about email list best practices in our blog post, 3 Reasons Why You Shouldn’t Buy Email Lists.

Up Next

Get the Help You Need

Chapter 8

Chapter 8

Get the Help You Need

Twilio SendGrid is here to help you correct your deliverability problems or answer any other email questions you may have. The resources below are designed to answer technical and non-technical questions alike:

Blog

Twilio SendGrid’s blog, The Full Send, is continuously updated with best practices, trends, and email examples. Visit the blog to answer your questions best practices, product, and technical questions. You can also subscribe to the blog to stay updated on all things email related.

Knowledge Center

The Twilio SendGrid Knowledge Center has nearly everything you need to get your email program off the ground. If you can’t find what you’re looking for in the menu, simply use the search function to find the topic that best answers your question.

Expert Services

If you want to avoid email deliverability pitfalls with your complex email setup, consider partnering with our in-house team of email experts. Our experts will help you efficiently navigate your technical configuration, provide customer account architecture and IP warm-up plans based on your unique sending needs, help train you and your team on the SendGrid UI, and more.

Support

The Support team is available to customers 24×7 and is capable of answering any Twilio SendGrid-related issue. Whether you need a step-by-step walkthrough on how to set up sender authentication or you have billing issues, you can contact Twilio SendGrid Support for help.  

Interested in expanding your developer toolkit? Twilio offers communication channels like voice, text, chat, and video by making the world’s telecommunication structure accessible through APIs.

Explore what you can build with Twilio.
twilio-mark-red

Get Started with SendGrid

SendGrid helps you focus on your business without the cost and complexity of owning and maintaining an email infrastructure. And with a full-featured marketing email service that offers a flexible workflow, powerful list segmentation, and actionable analytics, all of your email needs are met in one simple platform.

See Plans and Pricing
SendGrid uses cookies to enhance your experience. We use these for advertising and analytics purposes. By continuing to use our site, you agree to our use of cookies.
Newsletter Subscription

Sign up for our newsletter to get The Scoop on product and email news.

Please enter a valid email address.

We respect your privacy. Learn more about SendGrid's Privacy Policy here and Twilio's Privacy Policy here