Email API Integration Guide with Golang

Minimum code that you need to integrate Mailazy with your Golang application


You need to complete these given prerequisites, you can skip the step if you have already completed.

  1. Sign up for a Mailazy account.
  2. Complete Domain Authentication.
  3. Generate the Mailazy Access Key

Integrate Mailazy with Golang

  • Confirm that you are using supported go version (1.14 or higher)
  • Install the package via
import ""
  • Start Sending mail using the code provided below:
senderClient := mailazy.NewSenderClient("access_key", "access_secret")
to := ""
from := "Sender <>"
subject := "Sending with mailazy is easy!"
textContent := ""
htmlContent := ""
req := mailazy.NewSendMailRequest(to, from, subject, textContent, htmlContent)
resp, err := senderClient.Send(req)