SparkPost Email API
Author: f | 2025-04-25
SparkPost for Best email sending API. SparkPost is an enterprise-grade email API focused on deliverability and predictive analytics. It’s used by some of the world’s largest email
Feedback on API and code, on Email API crate for SparkPost
Called the "friendly from".Define the from email of the template: Input the full email address this template will be sent from. This is often displayed next to the from name (friendly from) in most mail clients.Define the reply to of the template: Input the reply to address of the template. If a recipient chooses to reply to a message sent using this template, this is the address that will be used as the reply to.Provide a description of the template: Input a description of this email. This field will NOT appear to your recipients and is used to help remind you of the purpose of the template.Choose engagement tracking options: If you would like this template to have open and click tracking enabled, click on either of these buttons. Orange is enabled, and grey is disabled.Choose transactional message options: Choose whether to mark this template as a transactional message. Orange is enabled, grey is disabled (and therefore "non_transactional".) Appropriately categorizing your templates is important because both "transactional" and "non-transactional" templates have separate suppression lists. For more information on suppression lists, see this article here.Define the content of the template:Creating HTML ContentCreating Text ContentHow to Use The Template LanguageAt this point, we are technically done with our template and we could "Save" or "Save and Publish", but let's take a few minutes to test this template and make sure it is behaving as we expect.How to test and preview templates in the SparkPost appTo test an email, you simply make sure all the above steps are completed and then click the "Preview" button. This allows you to view your email template.To send yourself (or approvers) a test transmission of your email template, enter the email addresses (comma separated) into the "To" field and click on the "Send Email" button.Please be aware that sending a test email is an actual transmission (make sure you don't have any LIVE customer email addresses in the "To" field).Creating templates with the APIPrerequisitesSparkPost API Key: You will need to have a SparkPost API Key with all the appropriate data-access permissions for Templates API management. How to create a SparkPost API KeyHTTP Request Knowledge: You will need to understand how to make HTTP(S) requests.Tools: You will need to have a REST Client, or access to a terminal which supports cURL.Once you have all the prerequisites on-hand, you're ready to read the Templates API Documentation. All of the SparkPost API Reference documents contain all the data specifications for the objects upon which you're interacting and a set of request examples.Choose HTML in the template editor: Choose "HTML" in the drop-down box.Insert your HTML: You can either use the SparkPost HTML editor or you can copy and paste your
SparkPost EMAIL REST API - Oracle Forums
Does SparkPost offer?SparkPost provides email, chat, community forums, and phone support options depending on your account tier. All paid plans include email tickets. Higher tiers add priority routing and dedicated account managers.Does SparkPost have email templates?Yes, SparkPost offers hundreds of customizable templates spanning categories like promotional, transactional, and behavioral emails. Templates can be edited directly with a drag-and-drop builder.How does SparkPost handle deliverability?SparkPost optimizes deliverability through automatic spam filtering, threat analysis, sender signing, traffic shaping, and other protections. They provide visibility into failures and have deliverability consultants available.Does SparkPost integrate with CRMs and marketing automation platforms?Yes, SparkPost offers open API integration as well as turnkey connectors for leading systems like Salesforce, Marketo, and Hubspot. Over 500+ APIs available.Is there a free trial?SparkPost offers a free tier allowing 12,000 emails for up to 3 months to test the platform. Paid packages start at $20/month.Twilio SendGrid FAQsWhat kind of deliverability does SendGrid offer?SendGrid has a strong sender reputation and partnerships with major ISPs to facilitate 97%+ global delivery rates. Features like link tracking, reputation monitoring, and analytics identify potential improvement areas.Does SendGrid have email templates?Yes, SendGrid offers hundreds of ready-made, customizable templates. An intuitive drag-and-drop editor makes template building easy.How does SendGrid handle automation?The Automation 360 plan unlocks multi-step workflow functionality leveraging triggers based on schedules, user behaviors, app events, and complex logic.What support options are included?SendGrid offers 24/7 live chat and phone support on premium plans. Lower tiers receive business hour email and chat assistance. All users can access community forums and an extensive knowledge base.Is there a free trial?Yes, SendGrid has a free 30-day trial for the Marketing Campaign package, normally $15/month thereafter.Final ThoughtsChoose SparkPost if…With strengths in infrastructure adaptability, segmentation precision, high deliverability, and automation workflows that let you build custom applications for your business, SparkPost excels as partSend email by sparkpost API getting unauthorize
Threshold to be hit before the count resets. Once a seed event has started, you can use the navigation on the right hand side to jump to the Reports page to see the results for a specific seeding campaign.Viewing ResultsWithin Signals Analytics (for Deliverability Analytics subscribers), you’ll have access to the eight additional Deliverability Metrics. These are accessed under the “Metrics” tab within the Analytics Report.You can use the Report Builder to select some or all of these metrics and SparkPost will show the results of your seed results alongside any other metrics you’re plotting. This tool lets you see your inbox rate alongside other critical email health information like acceptance rate, delay rate, and unsubscribe rate to give you a full picture of your email sending.Possible Use Case ScenariosDiagnosing Email Issues for Your CustomersA customer contacts your support team to say that they are not receiving a password reset for your site. After confirming that your systems are operational, you choose to seed your password reset campaign. After reviewing the results of this seed test you find that many of your password reset emails have started going to the spam folder.A proactive approach would be to use the Automatic Inline Seeding functionality to seed your password reset campaign on a regular basis. This way, you could notice sooner that your password reset emails are going to the spam folder more often. This gives you the chance to identify the issue (like bad HTML, broken DKIM records, or a broken link) before it impacts your deliverability.My Campaign_ID is Generated at the Time of SendingIf the campaign_ids you want to seed have a common prefix (for example “marketing”) you can set the Automatic Inline Seeding configuration to seed your campaign_id: marketing_* and SparkPost will count all your marketing messages for potential seeding.If your campaign_ids are truly unique and have nothing that could be pattern-matched, you can pass the campaign_id to the Automatic Inline Seeds API a few seconds before clicking send. SparkPost will take care of the rest once the config is updated or you can use a very relaxed wildcard. SparkPost for Best email sending API. SparkPost is an enterprise-grade email API focused on deliverability and predictive analytics. It’s used by some of the world’s largest emailIntroducing 'sparkpost' a Rust Crate for email API
Sign up for a SparkPost account and visit our Developer Hub for even more content.SparkPost Go API clientThe official Go package for using the SparkPost API.InstallationInstall from GitHub using go get:$ go get github.com/SparkPost/gosparkpostGet a keyGo to API & SMTP in the SparkPost app and create an API key. We recommend using the SPARKPOST_API_KEY environment variable. The example code below shows how to set this up.Send a messageHere at SparkPost, our "send some messages" api is called the transmissions API - let's use it to send a friendly test message:Hello world", From: "[email protected]", Subject: "Hello from gosparkpost", }, } id, _, err := client.Send(tx) if err != nil { log.Fatal(err) } // The second value returned from Send // has more info about the HTTP response, in case // you'd like to see more than the Transmission id. log.Printf("Transmission sent with id [%s]\n", id)}">package mainimport ( "log" "os" sp "github.com/SparkPost/gosparkpost")func main() { // Get our API key from the environment; configure. apiKey := os.Getenv("SPARKPOST_API_KEY") cfg := &sp.Config{ BaseUrl: " ApiKey: apiKey, ApiVersion: 1, } var client sp.Client err := client.Init(cfg) if err != nil { log.Fatalf("SparkPost client init failed: %s\n", err) } // Create a Transmission using an inline Recipient List // and inline email Content. tx := &sp.Transmission{ Recipients: []string{"[email protected]"}, Content: sp.Content{ HTML: "Hello world", From: "[email protected]", Subject: "Hello from gosparkpost", }, } id, _, err := client.Send(tx) if err != nil { log.Fatal(err) } // The second value returned from Send // has more info about the HTTP response, in case // you'd like to see more than the Transmission id. log.Printf("Transmission sent with id [%s]\n", id)}DocumentationSparkPost API ReferenceCode samplesCommand-line tool: sparksContributeTL;DR:Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Fork the repository.Go get the original code - go get your fork as a remote - git remote add fork your changes in a branch on your forkWrite a test which shows that the bug was fixed or that the feature works as expected.Push your changes - git push fork HEADSend a pull request. Make sure to add yourself to AUTHORS.More on the contribution processIntroducing 'sparkpost' A Rust Crate For Email Api Clipart
Last updated February 2021Create a templateOnce you understand how to send an email (transmission), you'll want to know how to create templates in SparkPost if you do not wish to use inline content in your transmissions API call.Currently there are two ways you can create templates in SparkPost:Create templates in SparkPost using the appCreate templates in SparkPost using the APIWhy create templates in SparkPost?Reference: Easily communicate with your team by having a set of named templates to reference.Error Reduction: Reduce duplicated efforts and potential embarrassing emails with typos or errors.Simplification: Building a library of "go-to" templates for recurrent use-cases reduces workload for your development team.Systemize: Using SparkPost templates in concert with substitution data can make it easy to create re-usable templates that allow for one to one personalized content.Creating templates with the appCreating a template using the SparkPost app is simple. To get started, let's go step-by-step through how you can define a new template.Defining your email template in SparkPostOpen the templates view: Click on Content > Templates in the main SparkPost navigation.Make a new template: Click on the Create Template button to open the SparkPost template editor.Name your template: Input a human-friendly name for your template in the "Template Name" field. This field will not be displayed to recipients.Provide an ID for your template [optional]: Input an ID for your template (note that if you do not provide an ID, SparkPost will create an ID for you). This field will not be displayed to recipients and is used to help remind you of the purpose of the template. *Note: The template ID is used when referencing the template via the API - When using a given template for an outbound message, you will reference the template ID, not the template name itself.Define subaccount usage of the template: Choose whether or not to share this template with subaccounts by clicking the checkbox titled "Share with all subaccounts". If a primary account creates a template and does not elect to share it with subaccounts, only the primary account may use that template. If the template is shared with all subaccounts, every subaccount has access to use the template, but only the primary account has edit permissions. If the primary account creates a template on behalf of a subaccount and assigns it to a single subaccount, both the primary account and subaccount can use and edit that template.Read more about using subaccounts in SparkPost here.Define the subject of the template: Input the subject line of the template that will appear in your recipient's mail client.Define the from name of the template: Input the from name to be used in the template. This is the name displayed in your recipient's email client, oftenSparkpost: sending email to same address/ Java API
Is needed to differentiate messaging. Lacking breadcrumb trails of engagement, segments feel static compared to SparkPost’s fluid, evolving contact groups.Winner: SparkPostWith greater depth in dynamic segmentation catered to real-time user actions, SparkPost earns the win. Granular targeting and automated list updating allow you to send emails with the highest personalization and relevance for each phase of the customer lifecycle.AnalyticsSparkPostSparkPost provides powerful email analytics both within campaigns and across your entire account. Real-time reporting offers insights into opens, clicks, bounces, blocks, and spam complaints. Maps showcase regional engagement levels.Drill-downs analyze performance by device type, browser, mailbox provider, and more. Side-by-side campaign comparisons spot trends and differences. Engagement and read-time metrics show whether subscribers consumed content.SparkPost’s advanced plan integrates directly with popular analytics platforms like MixPanel, Segment, and Heap for deeper analysis and closed-loop optimization based on wider business KPIs. Robust data for enhancing deliverability and fine-tuning audience targeting.SendGridSendGrid focuses more on campaign-specific email analytics rather than account-wide real-time analytics data. Reports contain opens, clicks, bounces, unsubscribes, spam reports, and more. Heat and click maps visually indicate interactions.Comparison charts help you gauge improvements in key metrics campaign over the campaign. Statistics can be broken down by location, device, browser, and other parameters to optimize segmentation.For wider-scope analytics, SendGrid relies more on its integrations with business intelligence tools like Google Analytics, Salesforce, and Oracle instead of baked-in functionality. Decent campaign insights, but lacks holistic engagement tracking.Winner: SparkPostThis SparkPost SendGrid comparison shows that with stronger account intelligence and real-time engagement metrics spanning channels, SparkPost claims the victory for best-in-class email analytics. SendGrid competes at the individual campaign level but lacks the unified scope or integration support across customer touchpoints.Unique FeaturesSparkPostSparkPost is a more modern email offering with robust email infrastructure and API capabilities. Built-in reCAPTCHA and anomaly detection protect against spam threats, while senderSparkPost Python API clientpython-sparkpost 1.3.6
Their years of experience and continual improvements make either solution a fantastic choice for any business to raise their email visibility and protect send reputation. We declare deliverability standards a tie between these leading ESPs.5. Customer Support and CommunitySparkPostSparkPost offers multiple support channels including live chat, email tickets, community forums for advice from other users, and an in-depth knowledge base of help articles and troubleshooting guides.Every plan comes with standard support via chat and email, with quick initial responses. Higher-tier plans provide priority routing and dedicated Technical Account Managers for personalized high-touch consultations.While community forums and self-serve resources prove useful for common issues, SparkPost’s full-service options excel for technical troubleshooting or strategic planning. Join the SparkPost Community Facebook Group to engage with over 5,000 fellow users.SendGridSendGrid prioritizes 24/7 chat, phone, and email support with their Diamond plan, while lower tiers receive business-hour assistance. Response times range from 2 minutes for Diamond customers down to 24 hours for free users.Alongside the expected suite of self-help options with knowledge base articles, documentation, and tutorial videos guiding platform and deliverability troubleshooting. SendGrid maintains an active online community in their public Community and Facebook Group.SendGrid’s premium Diamond phone support stands above SparkPost, but most users opt for more affordable packages with decent email-based assistance and lively peer forums.Winner: SparkPostFeaturing tailored support plans catering from beginners to experts across several channels, SparkPost edges out SendgGrid as the category winner here. Quicker responses and dedicated managers provide better value for the majority of small business owners.6. IntegrationsSparkPostSparkPost enables connecting your email campaigns to a wider marketing and operations stack through open API integration and partnerships turnkey connectors. You can easily integrate the platform’s robust API with your workflowsOver 500+ public APIs handle list syncing, data enrichment, metric tracking, behavioral event triggers, and more. CRM tools like. SparkPost for Best email sending API. SparkPost is an enterprise-grade email API focused on deliverability and predictive analytics. It’s used by some of the world’s largest email SparkPost for Best email sending API. SparkPost is an enterprise-grade email API focused on deliverability and predictive analytics. It’s used by some of the world’s largest email
SparkPost Python API clientpython-sparkpost 1.3.5
Salesforce integrate out-of-the-box, while developers can leverage code libraries for custom applications.Partnerships power easy integration without IT resources. SparkPost boasts native plugins for leading e-commerce platforms like Shopify and Magento for real-time order updates and customer engagement options.SendGridSendGrid takes an API-first approach, with 7 core APIs enabling developers to integrate email capabilities into custom apps and back-end systems for complete visibility and functionality.The API platform ecosystem consists of thousands of registered apps and integrators across CRMs, social media, analytics, and popular frameworks spanning use cases from marketing automation to platform management.For less technical users, SendGrid’s App Marketplace contains one-click installable turnkey applications like Mailchimp, HubSpot, and Eventbrite to expand functionality with minimal lift.Winner: TieBoth options enable extensibility through developer APIs for custom systems alongside turnkey integrations with major marketing and business systems. For breadth and depth of connectivity, SparkPost and SendGrid deliver flexibility and remain evenly matched.7. PricingSparkPostSparkPost offers a free plan for testing or low monthly email volume including basic analytics, 200 monthly emails, and 2 templates.The Standard paid plan runs $20/month including more emails, segmentation, and automation features. Pro plans add priority support, more emails, and compliance tools starting at $395. Enterprise custom quotes offer dedicated IPs, volumes over 150K/month, and custom SLAs.Overall, SparkPost delivers excellent bang for your buck across all tiers. Entry-level plans provide strong deliverability and features to power most small businesses’ needs affordably.SendGridSendGrid’s free tier allows 100 emails/day including analytics and assistive deliverability tools. The Essentials plan price is $15 for up to 40,000 emails and you pay more based on how many emails you want to send, as well as contacts and basic automation.You can upgrade to higher volume premier plan options which scale up with more emails, segments, and dedicated IPs. Upgrading to Marketing Campaign packages adds a bit more automation andSparkPost API - API Details - apiorb.com
Last updated February 2020One of our customers recently ran into issues attempting to send a test email via SMTP injection using STARTTLS while working with the openssl client. Our resolution is to utilize the "swaks" (Swiss Army Knife for SMTP). This command line utility makes it easy to send a test email via SMPTP and provides verbose output so you're able to view the commands and responses issued by the utility and received from the server.Prerequisites:A valid SparkPost API key with the "send with SMTP" permission enabledA valid sending domain configuredSending a Test Email Using swaksOnce you have swaks downloaded (optionally available in your PATH), you can send a test email using SparkPost SMTP injection by running the following command in a terminal window:swaks -server smtp.sparkpostmail.com:587 -tls --auth-user SMTP_Injection --auth-password **API_KEY>** --to **TO_EMAIL>** --from **FROM_EMAIL>**Substitutions:API_KEY - An api key created in app.sparkpost.com with "Send via SMTP" permissionTO_EMAIL - The email address of the test email recipientFROM_EMAIL - An email address on a configured Sending DomainSample Response=== Trying smtp.sparkpostmail.com:587...=== Connected to smtp.sparkpostmail.com.220 2.0.0 smtp.sparkpostmail.com ESMTP ecelerity 4.1.5.48834 r(Core:4.1.5.3) Thu, 14 May 2015 17:04:46 +0000 -> EHLO sample.local250-momentum1.platform1.us-west-2.aws.cl.messagesystems.com says EHLO to 38.88.217.98:63602250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250 8BITMIME -> STARTTLS220 2.0.0 continue=== TLS started with cipher TLSv1:DHE-RSA-AES256-SHA:256=== TLS no local certificate set=== TLS peer DN="/OU=GT81723185/OU=See www.rapidssl.com/resources/cps (c)14/OU=Domain Control Validated - RapidSSL(R)/CN=*.sparkpostmail.com" ~> EHLO someone.local250-momentum1.platform1.us-west-2.aws.cl.messagesystems.com says EHLO to 38.88.217.98:63602250-ENHANCEDSTATUSCODES250-AUTH=LOGIN PLAIN250-AUTH LOGIN PLAIN250-8BITMIME250 PIPELINING ~> AUTH LOGIN334 VXNlcm5hbWU6 ~> U01UUF9JbmplY3Rpb24=334 UGFzc3dvcmQ6 ~> WW91IGZvdW5kIHRoZSBzZWNyZXQgY29kZSEgRW1haWwgZGV2ZWxvcGVyc0BzcGFya3Bvc3QuY29tIGZvciBhIGZyZWUgdC1zaGlydCE=235 2.0.0 Authed. Go on. ~> MAIL FROM:250 2.0.0 MAIL FROM accepted ~> RCPT TO:250 2.0.0 RCPT TO accepted ~> DATA354 3.0.0 continue. finished with "\r\n.\r\n" ~> Date: Thu, 14 May 2015 10:04:46 -0700 ~> To: [email protected] ~> From: [email protected] ~> Subject: test Thu, 14 May 2015 10:04:46 -0700 ~> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/ ~> ~> This is a test mailing ~> ~> .250 2.0.0 OK 95/6F-30607-EA5D4555 ~> QUIT221 2.3.0 momentum1.platform1.us-west-2.aws.cl.messagesystems.com closing connection=== Connection closed with remote host.. SparkPost for Best email sending API. SparkPost is an enterprise-grade email API focused on deliverability and predictive analytics. It’s used by some of the world’s largest emailSparkPost Python API client python-sparkpost 1.3.6
With email marketing being an essential component of any successful customer engagement strategy, choosing the right email service provider (ESP) is a crucial decision for small business owners and marketers.Sparkpost and SendGrid are two popular ESPs that provide solutions for sending high volumes of email easily. Selecting between these two formidable options can impact deliverability rates, integration capabilities, and ultimately, return on investment.In this comprehensive Sparkpost vs SendGrid comparison guide, we will evaluate how the two platforms stack up across key criteria like features and functionality, ease of use, reliability, support, and pricing. With insights into the strengths and weaknesses of each email marketing platform, small business owners can better determine which solution will effectively meet their unique email marketing needs.1. Understanding the BasicsSparkPost was founded in 2014 by the founders of SMTP provider Message Systems. The CEO is Rich Harris, who has a background in building email infrastructure companies. SparkPost has rapidly grown in popularity, now serving billions of emails per month to over 5,000 customers.SendGrid was launched in 2009, founded by three former Force.com engineers: Tim Jenkins, Jose Lopez, and Isaac Saldana. Twilio acquired SendGrid in 2018 for $3 billion. SendGrid has established itself as one of the most widely-used ESPs, trusted by massive brands like Spotify, Airbnb, and Uber.Both SparkPost and SendGrid have become leaders in the email service provider space. SparkPost touts strong momentum with a modern infrastructure, while the long-standing SendGrid offers exceptional scalability and deliverability.2. Features and FunctionalityAutomationSparkPostSparkPost offers powerful email marketing automation capabilities through an intuitive drag-and-drop workflow builder. Users can create complex chains of triggered emails for welcome series, abandoned cart flows, subscriptions, and more.SparkPost’s Automation feature lets you set up “if/then” rules to send the right messages to the right contacts at the right time. For example, you can send anComments
Called the "friendly from".Define the from email of the template: Input the full email address this template will be sent from. This is often displayed next to the from name (friendly from) in most mail clients.Define the reply to of the template: Input the reply to address of the template. If a recipient chooses to reply to a message sent using this template, this is the address that will be used as the reply to.Provide a description of the template: Input a description of this email. This field will NOT appear to your recipients and is used to help remind you of the purpose of the template.Choose engagement tracking options: If you would like this template to have open and click tracking enabled, click on either of these buttons. Orange is enabled, and grey is disabled.Choose transactional message options: Choose whether to mark this template as a transactional message. Orange is enabled, grey is disabled (and therefore "non_transactional".) Appropriately categorizing your templates is important because both "transactional" and "non-transactional" templates have separate suppression lists. For more information on suppression lists, see this article here.Define the content of the template:Creating HTML ContentCreating Text ContentHow to Use The Template LanguageAt this point, we are technically done with our template and we could "Save" or "Save and Publish", but let's take a few minutes to test this template and make sure it is behaving as we expect.How to test and preview templates in the SparkPost appTo test an email, you simply make sure all the above steps are completed and then click the "Preview" button. This allows you to view your email template.To send yourself (or approvers) a test transmission of your email template, enter the email addresses (comma separated) into the "To" field and click on the "Send Email" button.Please be aware that sending a test email is an actual transmission (make sure you don't have any LIVE customer email addresses in the "To" field).Creating templates with the APIPrerequisitesSparkPost API Key: You will need to have a SparkPost API Key with all the appropriate data-access permissions for Templates API management. How to create a SparkPost API KeyHTTP Request Knowledge: You will need to understand how to make HTTP(S) requests.Tools: You will need to have a REST Client, or access to a terminal which supports cURL.Once you have all the prerequisites on-hand, you're ready to read the Templates API Documentation. All of the SparkPost API Reference documents contain all the data specifications for the objects upon which you're interacting and a set of request examples.Choose HTML in the template editor: Choose "HTML" in the drop-down box.Insert your HTML: You can either use the SparkPost HTML editor or you can copy and paste your
2025-04-06Does SparkPost offer?SparkPost provides email, chat, community forums, and phone support options depending on your account tier. All paid plans include email tickets. Higher tiers add priority routing and dedicated account managers.Does SparkPost have email templates?Yes, SparkPost offers hundreds of customizable templates spanning categories like promotional, transactional, and behavioral emails. Templates can be edited directly with a drag-and-drop builder.How does SparkPost handle deliverability?SparkPost optimizes deliverability through automatic spam filtering, threat analysis, sender signing, traffic shaping, and other protections. They provide visibility into failures and have deliverability consultants available.Does SparkPost integrate with CRMs and marketing automation platforms?Yes, SparkPost offers open API integration as well as turnkey connectors for leading systems like Salesforce, Marketo, and Hubspot. Over 500+ APIs available.Is there a free trial?SparkPost offers a free tier allowing 12,000 emails for up to 3 months to test the platform. Paid packages start at $20/month.Twilio SendGrid FAQsWhat kind of deliverability does SendGrid offer?SendGrid has a strong sender reputation and partnerships with major ISPs to facilitate 97%+ global delivery rates. Features like link tracking, reputation monitoring, and analytics identify potential improvement areas.Does SendGrid have email templates?Yes, SendGrid offers hundreds of ready-made, customizable templates. An intuitive drag-and-drop editor makes template building easy.How does SendGrid handle automation?The Automation 360 plan unlocks multi-step workflow functionality leveraging triggers based on schedules, user behaviors, app events, and complex logic.What support options are included?SendGrid offers 24/7 live chat and phone support on premium plans. Lower tiers receive business hour email and chat assistance. All users can access community forums and an extensive knowledge base.Is there a free trial?Yes, SendGrid has a free 30-day trial for the Marketing Campaign package, normally $15/month thereafter.Final ThoughtsChoose SparkPost if…With strengths in infrastructure adaptability, segmentation precision, high deliverability, and automation workflows that let you build custom applications for your business, SparkPost excels as part
2025-04-20Sign up for a SparkPost account and visit our Developer Hub for even more content.SparkPost Go API clientThe official Go package for using the SparkPost API.InstallationInstall from GitHub using go get:$ go get github.com/SparkPost/gosparkpostGet a keyGo to API & SMTP in the SparkPost app and create an API key. We recommend using the SPARKPOST_API_KEY environment variable. The example code below shows how to set this up.Send a messageHere at SparkPost, our "send some messages" api is called the transmissions API - let's use it to send a friendly test message:Hello world", From: "[email protected]", Subject: "Hello from gosparkpost", }, } id, _, err := client.Send(tx) if err != nil { log.Fatal(err) } // The second value returned from Send // has more info about the HTTP response, in case // you'd like to see more than the Transmission id. log.Printf("Transmission sent with id [%s]\n", id)}">package mainimport ( "log" "os" sp "github.com/SparkPost/gosparkpost")func main() { // Get our API key from the environment; configure. apiKey := os.Getenv("SPARKPOST_API_KEY") cfg := &sp.Config{ BaseUrl: " ApiKey: apiKey, ApiVersion: 1, } var client sp.Client err := client.Init(cfg) if err != nil { log.Fatalf("SparkPost client init failed: %s\n", err) } // Create a Transmission using an inline Recipient List // and inline email Content. tx := &sp.Transmission{ Recipients: []string{"[email protected]"}, Content: sp.Content{ HTML: "Hello world", From: "[email protected]", Subject: "Hello from gosparkpost", }, } id, _, err := client.Send(tx) if err != nil { log.Fatal(err) } // The second value returned from Send // has more info about the HTTP response, in case // you'd like to see more than the Transmission id. log.Printf("Transmission sent with id [%s]\n", id)}DocumentationSparkPost API ReferenceCode samplesCommand-line tool: sparksContributeTL;DR:Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Fork the repository.Go get the original code - go get your fork as a remote - git remote add fork your changes in a branch on your forkWrite a test which shows that the bug was fixed or that the feature works as expected.Push your changes - git push fork HEADSend a pull request. Make sure to add yourself to AUTHORS.More on the contribution process
2025-04-05