SMS AND EMAIL Provider
Originally
ADR-0022-SMS-AND-EMAIL-PROVIDER (v3) · Source on Confluence ↗ADR: 3rd Party Service for Sending SMS and Email Messages
Context
Our company has multiple leagues and departments that use different third-party services to send SMS and email messages:
- HubOps league uses Twilio for SMS to notify shoppers about their order status, and Mailtrap and Mailgun for email communications with WooCommerce users.
- The marketing department relies on Klaviyo for email marketing.
- Mobile Commerce plans to use an email service to send one-time passwords (OTPs) for shoppers using passwordless authorization and SMS for phone verification.
- Uncrew has registered the domain on Mailgun and received 12 emails.
Our goal is to unify and streamline our messaging services. To achieve this, we need to evaluate and select a common set of third-party solutions that can be used across all leagues and departments. These solutions should meet our requirements for SMS and email messaging, including cost-effectiveness, reliability, and ease of integration with our existing infrastructure, particularly Terraform.
Requirements:
HubOps:
Current Needs are notifying shoppers about order status and order confirmation.
Also WooCommerce with Jira Service Management for customer support.
Mobile Commerce will replace WooCommerce. So, native iOS and Android SDKs are good stuff for implementing customer support, which Jira does not provide.
Phone Verification: A secure, already implemented phone verification service is crucial to avoid building this feature in-house.
Current usege
Mailgun: 9,000 emails/month
Twilio: 11,500 SMS/month
Upcoming changes
Mobile Commerce targets up to 1000 new users per app launch. If each user uses a passwordless login method, that’s another 1000 emails per month and 1000 SMS messages when confirming each phone number. All this adds up to 10% to service usage services, which won’t affect the cost, given that the current bill is $120.
Mail Providers Comparasion
| Category | Mailgun | Twilio+SendGrid | Amazon SES | MessageBird | Sendinblue |
|---|---|---|---|---|---|
| Cost | - Free for up to 5,000 emails/month. - $35/month for Foundation plan. - Cost increases with higher volume. | - Twilio: $0.0079 per SMS. - SendGrid: Free for up to 100 emails/day, paid plans start at $15/month. | - $0.10 per 1,000 emails sent. - $0.12 per GB of attachments. - 1000 free emails per month for AWS users. | - $0.01 per SMS (varies by country). - $10/month for up to 6,000 emails. - Cost scales with volume. | - Free for up to 300 emails/day. - $25/month for 20,000 emails. - SMS pricing varies by country. |
| Cost for 9,000 emails/month | $35/month (exceeds free tier, on Foundation plan) | $15/month (within the basic paid tier) | $0.80 (9,000 emails @ $0.10 per 1,000 emails) | $15/month (for 9,000 emails) | $25/month (on the basic plan) |
| Supporting SMS | No | Yes (through Twilio) | Yes (through AWS SNS) | Yes | Yes |
| SMS Cost for 11,500 SMS/month | N/A | $90.85 (11,500 SMS @ $0.0079 per SMS) | $6.90 (11,500 SMS @ $0.0006 per SMS) | $115 (11,500 SMS @ $0.01 per SMS) | Varies (depending on region, generally around $92 for 11,500 SMS) |
| Supporting Terraform | Yes, but unofficial. | Yes, both Twilio and SendGrid support Terraform. | Yes, full Terraform support via AWS provider. | No, Should be here, but 404 detected. | Limited, primarily through integrations and APIs. |
| Phone Number Verification Service | No | Yes (Twilio Verify and Authy) | No (Requires custom implementation via AWS SNS) | Yes (MessageBird Verify) | No |
| Using as Support Chat | No | Yes (via Twilio Conversations/Flex for multi-channel support chat) | No (Requires Amazon Connect for chat capabilities) | Yes (via MessageBird Conversations API for multi-channel chat) | Yes (Basic chat feature for website live support) |
| Official Go Library | Yes (mailgun-go) | Yes (sendgrid-go, twilio-go) | Yes (aws-sdk-go) | Yes (messagebird-go) | No (Use API with HTTP requests) |
| Official JavaScript Library | Yes (mailgun.js) | Yes (@sendgrid/mail, twilio) | Yes (aws-sdk) | Yes (messagebird) | Yes (@sendinblue/client) |
| Mobile SDKs & Features | No | Twilio: Yes, mobile SDKs for iOS/Android supporting SMS, voice, push notifications, video calls, and chat (via Conversations/Flex). SendGrid: No mobile SDKs. | No (AWS SDKs for iOS/Android can be used with custom implementation) | Yes, mobile SDKs for iOS/Android supporting SMS, voice, chat, and WhatsApp messaging. | No (No dedicated mobile SDKs) |
| Okta SSO | No | Yes | No (General AWS IAM SSO) | Yes | No |
| SCIM Provisioning | No | Yes | No | No | No |
Summary
Good, but can be better
Mailgun: Focused primarily on email delivery. And lacks SMS and chat support, making it less versatile for broader communication needs.
❓ Why didn’t we review using Mailgun with a separate SMS service?
Combining two different services for email and SMS would make things more complicated. Managing them separately adds extra work and potential inconsistencies and makes it harder to expand in the future. It also means dealing with two payment systems and separate dashboards for analytics and maintenance, which can be a hassle. Plus, it doesn’t always save money—sometimes, using two separate services can cost more.
Amazon SES: A cost-effective and scalable email service within the AWS ecosystem, but it lacks direct support for SMS and chat. Integration can be complex, and there’s no dedicated customer support platform, making it less suitable for our future needs.
Sendinblue: Offers basic email and SMS services with limited chat capabilities, but lacks the advanced features, mobile SDKs, and integration flexibility that we require. It’s more suited for smaller-scale operations and simpler use cases.
Winners: Twilio+SendGrid vs. MessageBird
Twilio+SendGrid
Strengths:
- Comprehensive Communication Platform: Twilio offers a wide range of services beyond just SMS and email, including voice, video, and chat, making it a strong candidate for future expansion into customer support.
- Mobile SDKs: Twilio provides robust mobile SDKs for iOS and Android, supporting SMS, voice, push notifications, video calls, and chat, which are essential for mobile app integration.
- Terraform Support: Twilio oficcialy supports of configuring some services using Terraform, making it easy to integrate into our infrastructure as code workflows.
- Customer Support Platform: Twilio Conversations and Twilio Flex provide a scalable and customizable platform for customer support, enabling seamless multi-channel communication.
- Auth0 and Elastic Path Integration: Twilio+SendGrid integrates easily with Auth0 and Elastic Path, which are part of our existing tech stack.
Considerations:
- Cost: Twilio’s services can be more expensive, but the breadth of features may justify the cost.
- Future-Proofing: Given our plans to potentially expand into customer support, Twilio’s ecosystem offers the flexibility and scalability needed for future growth.
MessageBird
Strengths:
- Multi-Channel Messaging: MessageBird excels in providing multi-channel messaging, including SMS, voice, chat, and WhatsApp, through a unified platform.
- Mobile SDKs: Like Twilio, MessageBird offers mobile SDKs for iOS and Android, but supports just Push Notifications.
- Simple Integration: Like Twilio, MessageBird has excellent support for Golang and APIs that are developer-friendly.
Considerations:
- Terraform Support: We found a couple mentions about Terraform supporting, but any official articles. This could be a significant drawback if we rely on Terraform for infrastructure management.
- Customer Support Platform: While MessageBird supports multi-channel communication, it doesn’t offer a dedicated customer support platform like Twilio Flex. This could limit its future use as a comprehensive customer support solution.
Decision
Given our priorities, Twilio+SendGrid appears to be the stronger choice. The key reasons are:
- Future-Proofing: Twilio’s platform is highly versatile and can be expanded to include customer support via Twilio Conversations and Twilio Flex. This aligns well with our potential future needs.
- Reliable Terraform Support: Twilio has proven Terraform support, ensuring smooth integration with our existing infrastructure as code practices.
- Comprehensive Ecosystem: The ability to easily integrate with other tools in our tech stack, such as Auth0 and Elastic Path, makes Twilio+SendGrid a seamless choice for our current and future communication needs.