This project is simple APIs for sending email by Mailgun 🔫
This document assumes that you have a working Go development environment.
- Sign up Mailgun (link)
- Add your domain in Mailgun but this example use Sandbox Domains
- Clone project 😂
- Open terminal or cmd
- Go to directory proojet and use command
go run main.go
- Test upload image by Postman
This project requires the 8 parameters specified to connect Mailgun.
Parameter | Description |
---|---|
domain | Domain Name in Mailgun |
api_key_public | Public Validation Key in your account Mailgun |
api_key_private | Private API Key in your account Mailgun |
from | Sender of the message as reported by From message header, for example “Pond pond@example.com” |
to | Email for recipient of the message |
subject | Subject for send Email |
body (optional) | Message for send Email |
html (optional) | String html format inlined, for example <b>Text Bold</b> |
- If you use Sandbox Domains must add email recipient to domain by Mailgun because it use for test only. 🔥
- You must only provide field
body
orhtml
but if you use both, APIs will use fieldbody
instead.
We supports :
- Attachments
- HTML file
- Embedded images