The Mailngine Go SDK is designed to feel like a native part of your Go application. There are no complex configuration objects or builder patterns to memorize. You create a client with your API key, build a message struct, and call Send. That's it.
To get started, install the SDK with go get github.com/mailngine/mailngine-go. Then create a new client by passing your API key, which you can generate from the Mailngine dashboard under Settings > API Keys. We recommend storing the key in an environment variable rather than hardcoding it in your source code.
Sending an email is straightforward. Construct a mailngine.Message with the sender address, recipient, subject, and either an HTML or plain text body. Pass it to client.Send(ctx, message) and you'll get back a response containing the message ID and delivery status. The SDK handles retries, rate limiting, and connection pooling automatically so you can focus on your application logic.
For more advanced use cases, the SDK supports batch sending, template rendering with variable substitution, and attachment handling. Every method accepts a context.Context so you get full control over timeouts and cancellation. Check out the API reference for the complete list of options, and join our community if you have questions or feedback.