How to Set Up SparkPost as Your SMTP Relay
Bird
5 Aug 2019
1 min read

Key Takeaways
Purpose: This guide explains how to configure SparkPost as your SMTP relay — enabling you to send emails securely through SparkPost’s infrastructure using any email client (like Gmail) without custom coding.
Core setup:
Verify your sending domain in SparkPost.
Create an API key with “Send via SMTP” permissions.
In your email client, set the SMTP server to
smtp.sparkpostmail.com, port 587, usernameSMTP_Injection, and password as your API key.Confirm setup by verifying the sender email via a link sent to your inbox.
Security best practices:
Use a different domain for account login than your sending domain to avoid lockout if sending fails.
Use port 587 with STARTTLS for encrypted transmission.
Keep API keys confidential and rotate them periodically.
Advantages of SMTP with SparkPost:
Broad compatibility across platforms and frameworks.
No development skills needed — plug-and-play setup.
Fast delivery and detailed bounce notifications for troubleshooting.
Protects deliverability by separating transactional and marketing traffic from internal email systems.
Alternative option: Developers can use SparkPost’s REST API for more granular control, but SMTP is simpler for traditional mail clients and legacy systems.
Q&A Highlights
What is an SMTP relay?
It’s a mail-sending service that routes your outgoing messages through a trusted server (like SparkPost), improving deliverability and analytics visibility.
Why should I use SparkPost instead of my regular mail host?
SparkPost optimizes message delivery, manages IP reputation, and provides detailed event tracking—capabilities most built-in mail servers lack.
Can I use this with Gmail or Outlook?
Yes. Any client that supports SMTP can connect to SparkPost by entering the proper server name, port, username, and API key.
What’s the difference between SparkPost’s API and SMTP?
The API is ideal for developers integrating programmatic email into apps. SMTP is simpler, ideal for manual sending or legacy systems.
How do I test connectivity?
You can use
telnet smtp.sparkpostmail.com 587to confirm access, or send a test message from your configured client.
Simple mail transfer protocol (SMTP) is an approach to sending and receiving emails that helps email servers — the computers used for email operations — decode and understand your email requests.
Note: If you’re using SMTP to route all of your personal mail through SparkPost, awesome! However, be sure to use an email address with a different sending domain (not one associated with your SparkPost account) for your account login. That way, if you ever run into any issues, you’re still able to contact us for help. You can also test your SMTP connection manually using telnet to diagnose basic connectivity issues.
You know you need to send email, but you don’t want to spend a lot of time or effort on it — you just want something that works out of the box. It’s not too much to ask! Many frameworks, languages, and tools come with SMTP support, but the last step is the most important – an SMTP server. SparkPost fills that need with SMTP support and a simple setup process.
Today, I’ll be demonstrating how to set up an SMTP relay, so you can use your own email client to send emails from your personal domain. I’ll be using Gmail as my email client and shopwithkindness.org as my sending domain.
Let’s get started!
What Is SMTP?
Simple mail transfer protocol (SMTP) is an approach to sending and receiving emails that helps email servers — the computers used for email operations — decode and understand your email requests. When configuring SMTP, selecting the proper port ensures secure and reliable email transmission. For example, your email recipient appears in one section of the guidelines, which tells the server who the receiver is and where to reach them.
In SMTP, the outgoing mail server introduces itself to the receiving computer through a process known as a handshake. It then tells the receiving server what message to send and where to send it. The receiving server verifies the domain name and IP address before confirming the request. Once the incoming computer authorizes the communication, the initial computer transmits the message.
SMTP involves more extended conversation between the two servers to send the email and uses a text-based code known as ASCII to communicate.

What Are the Advantages of SMTP?
When Do You Use SMTP?
SMTP is only applicable to sending emails. The protocols cover transmitting the data between the two servers — the relay portion of the transaction. Another procedure, such as post office protocol (POP) or internet access protocol (IMAP), retrieves the message for the recipient from the incoming mail server.
What Is an SMTP Relay?
An SMTP relay is a company that provides a dedicated outgoing mail server using SMTP transmission standards, making bulk email sending efficient and effective.
Why Would I Use an SMTP Relay?

Many businesses rely on third-party SMTP relays for sending marketing communications. Separating promotional and transactional messaging from internal communications protects the primary business domain from blocklisting due to spam concerns.
What Is SparkPost Used For?
SparkPost is more than just an SMTP relay — we’re a complete email sending and delivery solution for businesses. The world’s industry leaders trust us with 4 to 5 trillion emails annually. SparkPost improves email communication and enables delivery, so your messages hit the inbox, not the spam folder. Our team uses the largest data footprint in the industry to provide robust analytic insights for decision-making.

Does SparkPost Use SMTP?
SparkPost is compatible with SMTP. There are two ways to use SparkPost to email your subscribers and customers — API or SMTP relay. The ideal method for your business largely depends on your existing structure and programming. API integrates easily with many popular systems, yet SMTP may be a better choice for businesses without a developer on staff or those operating on legacy systems. To understand the differences between API and SMTP approaches, read our comprehensive guide to email APIs in cloud infrastructure.
How to Setup SparkPost as Your SMTP Relay
There are a few things you’ll need before setting up your SparkPost SMTP relay.
An API key with the “Send via SMTP” permission enabled.
An email client or service which allows you to enable SparkPost as your SMTP relay.
For this walkthrough, I’ll be using Gmail. To begin, navigate to the settings.

From there, click on the “Accounts” tab.
Next, click on “Add another email address you own”.

In the pop-up menu, enter the (verified) email address and press next. I’d like to be able to send with “vincent@shopwithkindness.org”, so that’s what I type in.

Then, enter “smtp.sparkpostmail.com” as the SMTP Server,“SMTP_Injection” as the username, and 587 as the port. Your password should be your API key with “Send via SMTP” enabled. This information can be found under Account -> SMTP Relay in your SparkPost dashboard.

Let’s get started!
Lastly, you’ll need to log in to your inbox to confirm. After that, we’re done! Time to send some Shop With Kindness emails.



