SparkPost
Author: f | 2025-04-23
sparkpost-cloud-review sparkpost-cloud-features sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-cloud-service Updated Improve this page sparkpost sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-review sparkpost-features Updated ; Improve this page Add a description, image, and links to the sparkpost-features topic page so that developers can more easily learn about it.
SparkPost/python-sparkpost: SparkPost client library
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 part
GitHub - SparkPost/php-sparkpost: SparkPost client library
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, oftenGitHub - SparkPost/python-sparkpost: SparkPost client library
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-cloud-review sparkpost-cloud-features sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-cloud-service Updated Improve this page sparkpost sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-review sparkpost-features Updated ; Improve this page Add a description, image, and links to the sparkpost-features topic page so that developers can more easily learn about it.Subaccounts in SparkPost and SparkPost Enterprise
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 processSparkPost/node-sparkpost: SparkPost client library for Node.js - GitHub
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 anSparkPost/php-sparkpost: SparkPost client library for PHP - GitHub
Professional emails. Start from hundreds of pre-built templates or canvas layouts in the drag-and-drop editor, applying your colors, fonts, images, and branding efficiently.Personalization is simple through substitution tags that pull in customer data dynamically to customize messages. Templates are immediately rendered for mobile devices so you can confirm a responsive design.While less robust for design customization than SparkPost, you can use the code editor for fine tweaks. Integration with design tools like Webflow streamlines moving HTML email templates into SendGrid’s platform.Winner: SparkPostSparkPost takes template creation to the next level with extensive control over designs when customizing pre-built options. Plus, easier personalization, branding capabilities, and coding flexibility give SparkPost the win for the best email templates.SegmentationSparkPostSparkPost enables highly targeted email campaigns through robust segmentation options. Senders can create unlimited segments based on detailed recipient behavior, profile data, engagement metrics, and more.Segments can be dynamic – automatically updated based on real-time activity like email opens, clicks, transactions, and website actions. Combining filters with “and/or” logic makes complex targeting a breeze.SparkPost lets you test segment criteria before finalizing lists. Handy Venn diagrams provide visual representation when combining multiple segments for multi-faceted targeting scenarios.The platform makes it simple to organize all segments in one place for current snapshots of your most valuable groups for engagement. Overall, easy segment management powers personalized messaging at scale.SendGridSendGrid focuses more on traditional static segmentation compared to SparkPost’s real-time dynamic options. You can still target customer groups based on profile data and attributes to drive personalized communications.Basic filters, tags, and contact list creation provide the building blocks for segmented distribution. Automations enhance targeting through event-triggered emails – you could send a win-back message to dormant subscribers after 90 days of inactivity, for example.While functional for general scenarios, SendGrid lags SparkPost when more complex, multi-variable targeting based on ongoing behaviorsSparkPost/python-sparkpost: SparkPost client library for Python - GitHub
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-cloud-review sparkpost-cloud-features sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-cloud-service Updated Improve this page sparkpost sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-review sparkpost-features Updated ; Improve this page Add a description, image, and links to the sparkpost-features topic page so that developers can more easily learn about it.
SparkPost/java-sparkpost: SparkPost client library for Java - GitHub
HTML into the Template Editor.Include test substitution data [optional]: If your template's HTML is using substitution data, then you will need to add some "Test Substitution Data". This is a JSON object that you can author(or copy/paste) by clicking the "Test Data" button. Please note that either the "substitution data" or "metadata" objects will replace substitution variables within your template. The difference between the two, when you begin using a template in production, is that values nested in the "substitution data" object will not appear in message events, whereas values nested in the metadata object will appear in message events.Preview your HTML Template: Once you have added the HTML you wish to use, click the "Preview" link to view the rendered output example.Authoring Text content for your templates in the SparkPost appChoose Text in the template editor: Choose "Text" in the drop-down box.Insert your Text: You can either use the SparkPost Text editor or you can copy and paste your Text into the Template Editor.Include test substitution data [optional]: If your template's Text is using substitution data, then you will need to add some "Test Substitution Data". This is a JSON object that you can author(or copy/paste) by clicking the "Test Data" button. Please note that either the "substitution data" or "metadata" objects will replace substitution variables within your template. The difference between the two, when you begin using a template in production, is that values nested in the "substitution data" object will not appear in message events, whereas values nested in the metadata object will appear in message events.Preview your Text template: Once you have added the Text you wish to use, click the "Preview" link to view the rendered output example.Outstanding! You've sent your first email / transmission in SparkPost and you've created your first template.SparkPost @SparkPost - Twitter Profile - Sotwe
Customized sender identities. The premium Support+ package caters to huge volumes with dedicated infrastructure.For large enterprises managing tens of millions of emails, SendGrid offers highly customized quotes and support SLAs more suited for huge scale than SparkPost’s options.Winner: SparkPostSparkPost pulls ahead on pricing for small to medium businesses, with very generous free inclusions and affordable growth to fit more moderate email volumes. SendGrid only edges ahead at extremely high-tier use cases above SparkPost’s intended customer size.8. Reviews and ReputationSparkPostSparkPost earns strong reviews across software review sites like G2 and Capterra, highlighted by its 4.4/5 stars on G2 from over 140 verified user reviews.Praise focuses on excellent deliverability, dedicated IP, easy-to-use and intuitive interface, quality support, and overall value for money. Some negatives of the cloud-based SMTP service point out the occasional glitches with automated messages, template limitations, and a learning curve for advanced configuration.Considering its modern infrastructure and more attractive pricing, reviews reflect SparkPost as a top challenger for popular consumer mail clients, which is why the company is quickly gaining a reputation in the ESP industry.Read Sparkpost Reviews on G2.SendGridWith over 6,300 reviews averaged to a 4.5/5 star overall rating, SendGrid enjoys tremendous validation across major software review platforms like G2 Crowd, Capterra, and TrustRadius.The platform earns consistent praise for reliable delivery and scalability thanks to strong partnerships with major ISPs. Reviews also mentioned world-class deliverability consultancy and customer support options.Despite being the priciest option, the vast majority agree that SendGrid provides fantastic reliability and inbox placement at huge volumes to warrant the costs for established enterprises.Read SendGrid Reviews on G2.Winner: SendGridBoasting nearly 10x more validated reviews averaging slightly higher satisfaction, SendGrid emerges as the winner for strongest industry validation. SparkPost makes fantastic inroads but currently lacks the reputation scale and longevity of SendGrid.9. FAQ’sSparkPost FAQsWhat kind of support. sparkpost-cloud-review sparkpost-cloud-features sparkpost-download sparkpost-tutorial sparkpost-setup sparkpost-cloud-service Updated Improve this pageSparkPost by MessageBird Reviews (2025) - SparkPost by
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 senderComments
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 part
2025-04-02Last 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, often
2025-03-28Sign 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-03-31