Go Web API for Sending Emails via Contact Form
A couple thoughts on contact.go.
Global Variables
In general, it's advised to not use global variables like
var mailgunSender string = &quot;email@sender.com&quot;
var mailgunReceiver string = &quot;email@receiver.com&quot;

Instead, there are a few options. You already have a struct definition inside the HandleContact closure, so you could just move them there. You could also pass them as arguments to HandleContact().
The other alternative could be to define a Mailgun struct with those as fields (and could probably include the mailgunDomain and mailgunAPIKey as well). Then define HandleContact as a method on the Mailgun struct, and use the handler by first creating a new Mailgun with the appropriate values like so:
main.go
mg := Mailgun{
    Sender:   &quot;email@sender.com&quot;,
    Receiver: &quot;email@receiver.com&quot;,
    Domain:   mailgunDomain,
    ApiKey:   mailgunAPIKey,
}
r.HandleFunc(&quot;/contact&quot;, mg.HandleContact()).Methods(&quot;POST&quot;, &quot;OPTIONS&quot;)

contact.go
type Mailgun struct {
    Sender:   string
    Receiver: string
    Domain:   string
    ApiKey:   string
}
func (m *Mailgun) HandleContact() http.HandlerFunc {
    type body struct {
        Name    string `json:&quot;name&quot;`
        Email   string `json:&quot;email&quot;`
        Message string `json:&quot;message&quot;`
    }

    mg := mailgun.NewMailgun(m.Domain, m.APIKey)
    //etc...

I think the biggest advantage to setting it up this way is that it becomes very testable. You can inject whatever settings are appropriate for testing.
Printing
fmt.Printf() outputs to Stdout by default, so the lines
fmt.Fprintln(os.Stdout, &quot;## New message!&quot;)
fmt.Fprintln(os.Stdout, message+&quot;\n&quot;)
// ...
fmt.Fprintln(os.Stdout, &quot;Mailgun response:&quot;, resp)
fmt.Fprintln(os.Stdout, &quot;Mailgun ID:&quot;, id)

are functionally the same as
// Note 2 newlines to keep output identical to your implementation
fmt.Printf(&quot;## New message!\n %s\n\n&quot;, message) 
// ...
fmt.Printf(&quot;Mailgun response: %s\n&quot;, resp)
fmt.Printf(&quot;Mailgun ID: %s\n&quot;, id)

Errors
Don't forget to handle the error from json.NewEncoder(w).Encode(b) at the end of contact.go. As the code is written I don't see any reason why it should ever return an error, you're just re-encoding the body you just decoded and echoing it back to the client. But if you ever change your code and the body is modified in some way it could fail silently and lead to debugging headaches.
Also wondering what the purpose of re-encoding is, you could just store and re-use the original value of r.Body. Did you mean to encode and return the response from Mailgun?