• Email Marketing & Salesforce Integration

Building Custom Email Delivery Solutions with Salesforce and Third-party SMTPs

  • Liza Pylypenko
  • 10 min read
Building Custom Email Delivery Solutions with Salesforce and Third-party SMTPs

Intro

In today's whirlwind of digital communication, email stands tall as the unwavering pillar of business communication for enterprises, big and small. Yet, as email traffic increases in volume and complexity, businesses encounter significant challenges in managing and optimizing their email systems.

This is where Salesforce comes into play. Known primarily for its leadership in CRM, Salesforce offers much more. Salesforce's integrated solutions enable companies to maintain effective communication channels, ensuring that important emails are delivered quickly and securely.

In this article, we'll explore the benefits of incorporating third-party SMTP services into Salesforce. We’ll examine their features, walk you through the integration process, highlight the improvements they can bring to your email communications, address possible obstacles and offer solutions, equipping you with the knowledge to elevate your business's email strategy.

Salesforce Relay Feature: A Brief Overview

Salesforce Relay Feature

Image source: Get SMTP Relay

Salesforce is brimming with features, and one that stands out for businesses aiming to upgrade their email delivery is the Salesforce Relay.

Salesforce Relay serves as a bridge that connects the Salesforce ecosystem with third-party Acting as an intermediary, Salesforce Relay forwards outbound emails from Salesforce to a chosen third-party SMTP server.

Meet Ranktracker

The All-in-One Platform for Effective SEO

Behind every successful business is a strong SEO campaign. But with countless optimization tools and techniques out there to choose from, it can be hard to know where to start. Well, fear no more, cause I've got just the thing to help. Presenting the Ranktracker all-in-one platform for effective SEO

We have finally opened registration to Ranktracker absolutely free!

Create a free account

Or Sign in using your credentials

Connecting a third-party SMTP service with Salesforce through Relay unlocks a suite of benefits. It connects you with top-tier email delivery services, boosting your chances of landing in the targeted inbox instead of the dreaded spam folder.

Why Opt for Third-party SMTP Solutions?

Salesforce's built-in email capabilities are solid, but there are some good reasons for bringing third-party SMTP solutions into the mix. Here are the three most important ones.

Why Opt for Third-party SMTP

Image source: Mailtrap

Enhanced deliverability

One of the primary reasons for choosing a third-party SMTP solution is improved email deliverability.

External services often have dedicated infrastructure and algorithms designed to ensure that emails not only reach their destinations but also navigate the complex landscape of spam filters and security protocols.

This results in higher inbox placement rates, which is vital for maintaining effective communication with clients and customers.

Scalability and volume handling

As businesses grow, so does the volume of emails they send. Third-party SMTP solutions excel in handling large volumes of email traffic without compromising speed or deliverability.

Whether it's transactional emails, email marketing campaigns, or routine business communication, integrated SMTP services can scale with your business needs, ensuring that your email infrastructure is never a bottleneck for growth.

Customizability and integration flexibility

Third-party SMTP solutions offer a level of customizability and integration flexibility that can be a game-changer for businesses with specific needs.

Meet Ranktracker

The All-in-One Platform for Effective SEO

Behind every successful business is a strong SEO campaign. But with countless optimization tools and techniques out there to choose from, it can be hard to know where to start. Well, fear no more, cause I've got just the thing to help. Presenting the Ranktracker all-in-one platform for effective SEO

We have finally opened registration to Ranktracker absolutely free!

Create a free account

Or Sign in using your credentials

Tailoring the branding of email templates, integrating with other marketing tools, or setting up complex automation workflows — third-party SMTP services provide the tools and APIs needed to craft a bespoke email solution that fits seamlessly into your business ecosystem.

Use case: Streamlining email campaigns for improved customer engagement

Spotify's journey with their email campaigns is quite an eye-opener. Imagine this: it's the end of 2020, and Spotify is in full swing with their biggest email campaign ever.

But suddenly, they hit a snag — their emails are getting caught in spam traps. And because of this, their email service provider, Twilio SendGrid, is on the verge of shutting down their campaign to preserve network integrity.

spotify

Image source: Email mastery

So, what led to Spotify's predicament?

At the core was their email list hygiene. Without mandatory user verification at sign-up, their list swelled with fraudulent accounts, triggering the spam trap crisis.

Spotify then partnered with SendGrid to conduct a thorough audit of their user history and email processes. Together, they devised strategies to avoid spam traps and other harmful addresses.

This fiasco shone a light on a key email marketing principle: the importance of a strategic and meticulous approach to campaign management. This case highlights the necessity of streamlining email campaigns for better customer engagement, a task where third-party services can help crucially.

Integration of Mailtrap Email Sending with Salesforce

mailtrap

Image source: Mailtrap

Mailtrap is an email delivery solution that offers a different approach compared to traditional SMTP services.

Mailtrap is primarily used as a testing tool, allowing developers and QA teams to test and debug email notifications and services without sending them to actual recipients.

This can be extremely useful when integrated with a CRM system like Salesforce, especially in development and staging environments.

Features

Mailtrap provides a "fake" SMTP server to capture emails sent from your development and staging environments. It allows you to view, test, and share emails without spamming real customers.

Key Mailtrap’s features include the ability to analyze HTML and plain text emails, check spam scores, and ensure that emails render correctly across various email clients. It's particularly valuable for email testing to catch bugs and issues before they impact real users.

Step-by-step integration process

Here’s an easy instruction on how to integrate Mailtrap with Salesforce.

  1. Sign up for a Mailtrap account. Create a new inbox to get your unique SMTP credentials.
  2. Configure Salesforce email settings. In Salesforce, go to the email settings and input the SMTP details provided by Mailtrap.
  3. Set up filters. Under "Email Relays," find and click on the link for "filters for recipients and sender domains." Select the Mailtrap Testing SMTP relay you've just configured from the Email Relay dropdown menu.
  4. Test the integration. Send a test email from Salesforce to verify that it's captured in the Mailtrap inbox using the following script:

public class ApexEmailSample {

public static void sendEmail(String useremail){      

Messaging.reserveSingleEmailCapacity(20);

    Messaging.SingleEmailMessage mymail = new Messaging.SingleEmailMessage();

    String[] toaddresses = new String[] {useremail};

    String[] toccaddresses = new String[] {'som****@gmail.com'};

    String[] tobccaddresses = new String[] {'ez*****@gmail.com'};

               

    mymail.setToAddresses(toaddresses);

    mymail.setCcAddresses(toccaddresses);

    mymail.setBccAddresses(tobccaddresses);

    mymail.setReplyTo('[email protected]');

    mymail.setSenderDisplayName('Salesforce Support');

    mymail.setSubject('An email from Salesforce');

    mymail.setPlainTextBody('This email has been sent through Apex');

    mymail.setHtmlBody('<p>This email has been sent through Apex.</p>');

   

    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mymail });

system.debug(useremail);

}

}

  1. Monitor and debug. Use Mailtrap's interface to view, debug, and share the emails sent from Salesforce.

With these benefits, integrating Mailtrap with Salesforce can lead to more effective email campaigns, enhanced customer engagement and overall email marketing strategy.

Benefits of this integration

Integrating Mailtrap into your workflow can offer several advantages like:

  • Deliverability. Mailtrap is designed to maximize email deliverability. Its features are focused on ensuring your emails land in the recipient's inbox, not the spam folder.
  • Scalability. Mailtrap excels in handling large volumes of email (from 100 to over 5 million emails/month), providing the necessary infrastructure to balance the load effectively. This is particularly useful for businesses that find Salesforce’s daily email limits restrictive.
  • Advanced features. With Mailtrap, you gain access to a suite of additional features such as error analysis, customizable email templates, detailed analytics, A/B testing, and automation tools, all of which can significantly enhance your email campaigns.
  • Cost-effectiveness. Depending on the volume and features required, Mailtrap can often be a more affordable choice compared to other solutions, offering a better return on investment for your email communications.

Potential challenges

Integrating Mailtrap with Salesforce can streamline your email testing, but it's not without challenges. Let’s see the potential hurdles and their solutions to ensure a smooth integration process.

Challenge 1: Integration complexity

Integrating any third-party service with Salesforce can require some technical setup, which might be daunting for those without technical expertise.

Suggested solution: Mailtrap provides detailed documentation and customer support to assist with the integration process. So you can rely on the documentation for easier integration.

Challenge 2: Dependency on another service

By using a third-party service like Mailtrap, you introduce a new dependency into your system, which could potentially have its own downtime or issues.

Suggested solution: Mailtrap is known for its stability and reliability, but it's always wise to have backup email services or protocols for handling downtime, just in case.

Integrating Mailtrap with Salesforce is a smart move for businesses looking to refine their email services without risking real-world mishaps. Even though it's primarily a testing tool, the insights and debugging capabilities it offers can significantly improve the quality of your business’ email communication.

Exploring Additional SMTP Solutions

While the benefits of integrating third-party SMTP solutions with Salesforce are clear, choosing the right service can be pivotal to your success. Let’s delve into a couple of other SMTP solutions, their features, benefits, and potential challenges.

SMTP Solution #2: SendGrid

sendgrid

Image source: SendGrid

SendGrid is a cloud-based SMTP provider known for its reliable email delivery services. It offers a comprehensive suite of features, including email marketing tools, detailed analytics, and a user-friendly interface.

SendGrid also provides robust APIs for developers looking to integrate its functionalities into various applications.

Integration steps with Salesforce

Here’s how you can integrate SendGrid with Salesforce CRM in just several steps:

  1. Create a SendGrid account.
  2. Go to the “API Keys” section and create a new API key with full access permissions.

apikeys

Image source: HevoData

  1. Enter the API Key in the “Authorization” textbox in the “Headers” section.
  2. Change the notification.email parameter to true in the “Request Body” Section.
  3. Enter contact IDs in the “list_id” and “segment_ids” parameters for export.
  4. Get a downloadable CSV file with your contacts by clicking “Send Request.”
  5. Import your contacts into Salesforce with Data Import Wizard or Data Loader.
  6. Go to Setup in Salesforce and create a new email relay by entering SMTP server details provided by SendGrid.
  7. Save your settings.
  8. Send a test email from Salesforce using SendGrid and verify that the email is sent successfully.

By following these steps, you should have a successful integration of SendGrid with Salesforce.

Benefits

Integrating SendGrid’s SMTP service with Salesforce brings numerous benefits that can significantly enhance your email communication strategy. Here are some of the key advantages:

  • Improved email deliverability. By integrating with SendGrid, Salesforce users can benefit from high inbox placement rates, dedicated IP addresses, and ISP relationships.
  • Comprehensive analytics and reporting. SendGrid provides detailed analytics on open and click tracking, bounce rate analysis, and engagement reports, and reporting features that allow businesses to track the performance of their email campaigns.
  • Customization. SendGrid’s integration allows for a high degree of customization and personalization in your email communications through dynamic templates and segmentation capabilities.

Businesses can unlock these and other benefits by integrating SendGrid with Salesforce when striving for better email marketing outcomes with the help of an email assistant.

Potential challenges

Integrating SendGrid with Salesforce, while highly beneficial, can present certain challenges that businesses should be prepared to address.

Challenge 1: Steep learning curve

SendGrid's platform, while powerful, comes with a learning curve that can be initially daunting for new users.

Suggested solution: Allocate time for training and familiarization with SendGrid's interface. Utilize SendGrid's tutorials, knowledge base, and community forums to accelerate the learning process.

Challenge 2: Poor segmentation capabilities

SendGrid's segmentation and automation capabilities may fall short for marketers seeking to execute highly personalized and complex campaigns.

Suggested solution: Explore third-party tools or services that can complement SendGrid's offerings.

SMTP Solution #3: Mailgun

mailgun Image source: Mailgun

Mailgun is a robust SMTP solution tailored for developers, known for its scalability and impressive deliverability.

Mailgun offers a suite of features to enhance your email campaigns, including comprehensive analytics for performance tracking, flexible webhooks for real-time notifications, and a rich set of APIs for seamless integrations.

Additionally, Mailgun provides email validation services to maintain a clean email list, advanced features like A/B testing and email scheduling, and a strong commitment to security and compliance.

Integration steps with Salesforce

Here’s how you can integrate Mailgun with Salesforce:

  1. Sign up for Mailgun if you haven't already.
  2. Get domain information and API key in your Mailgun dashboard.
  3. Find Mailgun Connector in Salesforce AppExchange and install it.
  4. Go to the Mailgun settings within Salesforce to enter your Mailgun domain and API key.

settings

Image source: Get SMTP Relay

  1. Go to Setup in Salesforce, search for "Email Relay," click "New Email Relay" and fill in the SMTP server details that Mailgun provided.
  2. Send a test email from Salesforce using Mailgun to ensure the integration is working well.

By following these steps, you'll establish a successful integration of Mailgun with Salesforce, leveraging the robust features Mailgun has to offer.

Benefits

Integrating Mailgun with Salesforce offers several compelling benefits that can transform your email communications:

  • Scalable infrastructure. Mailgun is built to scale, making it an ideal choice for businesses with fluctuating email volumes.
  • Enhanced security. Security is a paramount concern for Mailgun, providing features that safeguard your email communications, like email authentication and TLS encryption.
  • Developer-friendly tools. Mailgun's APIs and webhooks make it a perfect choice for developers, offering the flexibility to create custom integrations and automate email processes within Salesforce.

These benefits highlight why Mailgun is a great option for businesses looking to integrate a powerful SMTP solution with Salesforce.

Potential challenges

Here are the issues you should be familiar with before integrating Mailgun with Salesforce.

Challenge 1: Integration maintenance

The connection between Salesforce and Mailgun may require ongoing maintenance to accommodate updates or changes in either platform, which can be a challenge considering Mailgun’s technical build.

Suggested solution: Assign a team member or an external consultant to monitor the integration, keeping an eye on updates from both Salesforce and Mailgun.

Challenge 2: Managing email volume costs

Mailgun offers a tiered pricing model based on email volume, which can lead to unexpected costs if email volumes fluctuate significantly.

Suggested solution: Keep a close eye on your email sending patterns and adjust your Mailgun subscription tier as needed. Consider setting up alerts for when you're approaching the limits of your current tier to avoid overage charges.

Third-Party SMTP Solutions: What’s Next?

Selecting the right SMTP solution to integrate with Salesforce is more than a technical decision; it's a strategic one. The email delivery system you choose can significantly impact your business's communication efficacy and customer engagement.

It's not a one-size-fits-all scenario, and what works for one business might not be the ideal solution for another. That’s why it's crucial for businesses to test different third-party SMTP solutions to find your perfect match.

Meet Ranktracker

The All-in-One Platform for Effective SEO

Behind every successful business is a strong SEO campaign. But with countless optimization tools and techniques out there to choose from, it can be hard to know where to start. Well, fear no more, cause I've got just the thing to help. Presenting the Ranktracker all-in-one platform for effective SEO

We have finally opened registration to Ranktracker absolutely free!

Create a free account

Or Sign in using your credentials

As you try each out, take into account factors like the anticipated volume of emails, the necessity for reliable deliverability, budget limitations, and the level of technical expertise available within your team.

Looking ahead, the dynamic duo of email delivery solutions and Salesforce is only getting tighter. As businesses become more data-savvy, the gold mine of insights from email analytics turns into a must-have.

And when betting on what's coming next, we envision a fusion of cutting-edge AI and machine learning, fine-tuning our email game and supercharging customer bonds.

So start testing out your third-party SMTP options today to set the stage for unmatched engagement, streamlined operations, and business growth in a rapidly shifting digital domain before they take a leap into major technological advancement!

Liza Pylypenko

Liza Pylypenko

PR and Marketing

For the past several years, I've navigated the PR and marketing directions with a keen expertise in email infrastructure and product marketing. This journey has equipped me with strategic knowledge and inspired me to document my learnings to help foster business growth. My mission is to offer readers a comprehensive view into the intersection of performance-focused email marketing and the world of optimized email communication.

Start using Ranktracker… For free!

Find out what’s holding your website back from ranking.

Create a free account

Or Sign in using your credentials

Different views of Ranktracker app