Skip to contentSkip to navigationSkip to topbar
Go to the Twilio SendGrid Docs home page
Twilio SendGrid Docs
For Developers
Parsing Email
Inbound Parse
Inbound Email Parse WebhookSetting Up The Inbound Parse WebhookSecuring your Parse Webhooks
Partners
Migration
Migrating from a partner account
Platform Partners
Amazon MarketplaceBuilding an iOS App on Windows AzureGoogleJelasticSending Email with Microsoft AzureMicrosoft Azure
Sending Email
SendGrid v3 API
Getting started with the SendGrid APIAutomate Adding Subusers with the SendGrid APICross Origin Resource Sharing (CORS)cURL Examples for Common Use CasesGetting Started with Transactional EmailHow to Create a Subuser with the APIPersonalizationsEmail API Quickstart for GoEmail API Quickstart for Node.jsEmail API Quickstart for PHPEmail API Quickstart: How to Send Email with PythonEmail API Quickstart for RubySandbox ModeScheduling EmailSend Mime Messages With SendGridCanceling a scheduled sendStopping an in-progress sendUsing Handlebarsv3 API C# Code Examplev3 API Go Code Examplev3 API Java Code Examplev3 API Kotlin Code Examplev3 Mail Send FAQv3 API PHP Code Examplev3 API Python Code Examplev3 API Ruby Code Example
SendGrid Plugins
Apple MailUsing SendGrid with BriteVerifyDrupalSugarCRM Integration
Sending Email
AuthenticationEnforced TLSGetting Started with the Email Activity Feed APISegmentation Query Language ReferenceSender IdentitySingle Sends 2020 UpdateUpgrade your authentication method to API keysWeb API vs. SMTP for Sending Email
Send SMTP
Building an X-SMTPAPI HeaderHow to Send an SMTP EmailIntegrating with the SMTP APISMTP Errors and Troubleshooting
Frameworks
CakePHPCodeIgniterDjangoSend Email in LaravelRuby on RailsSymfonyZend
X-SMTPAPI Header
Working with CategoriesSending a Legacy Transactional Template Email over SMTPScheduling ParametersSection TagsSMTP FiltersSMTP Go Code ExampleSMTP Node.js Code ExampleSMTP Perl Code ExampleSMTP PHP Code ExampleSMTP Python Code ExampleSMTP Ruby Code ExampleSubstitution TagsSuppression GroupsUnique Arguments
Mail Servers
Exchange 2010Exim 4Microsoft IIS 7.5PostfixQmailSendmailssmtp
SendGrid Partners
Building Serverless Apps with Form.io + SendGridHow to integrate with MailPoetSending New Emails via SendGrid For New Gravity Forms SubmissionsSend Emails Through SendGrid For New Caught Webhook DataSending SendGrid Emails For New PostgreSQL Custom Query Row MatchesSending SendGrid Emails From New Google Sheets RowsSending Emails From SendGrid to Tagged Infusionsoft ContactsSending SendGrid Email When New Firebase Child Records Are Added
Open Source Apps
JoomlaAPI LibrariesMODXphpBB
SendGrid v2 API
How To Migrate From v2 to v3 Mail Sendv2 API C# Code Examplev2 API Go Code Examplev2 API Java Code Examplev2 API Node.js Code Examplev2 API Perl Code Examplev2 API PHP Code Examplev2 API Python Code Examplev2 API Ruby Code Example
Mail Clients
Outlook 2013Outlook 2007Thunderbird
Tracking Events
Getting Started
Getting started with the Event WebhookGetting Started with the Event Webhook Security Features
Reference & Troubleshooting
Event Webhook ReferenceTwilio SendGrid Event Webhook API ReferenceTwilio SendGrid Event Webhook Overview
SendGrid Partners
SendGrid and Google AMP for EmailSendGrid Source
Code Examples
Event Webhook C# Code ExampleEvent Webhook Go Code ExampleEvent Webhook Node.js Code ExampleEvent Webhook PHP Code ExampleEvent Webhook Python Code Example
Migration Guides
v2 to v3 API
Twilio SendGrid Logo
Twilio SendGrid Docs
  • Log in
  • Sign up

SMTP Go Code Example


SendGrid recommends using our Go SMTPAPI library(link takes you to an external page), full documentation can be found on GitHub. Our Go API library(link takes you to an external page) allows you to fully integrate with SendGrid.

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the SendGrid tag(link takes you to an external page) on Stack Overflow.

Terms of service
Privacy Policy

Copyright © 2025 Twilio Inc.

Twilio SendGrid