Introduction | laravel-mailcoach-mailer-go | Spatie       

 SPATIE  

laravel-mailcoach-mailer-go
===========================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-mailcoach-mailer-go](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1)  Introduction

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1) 

  Introduction    
- [ Introduction ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/introduction)
- [ Installation and setup ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/installation-and-setup)
- [ Usage ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/usage)
- [ Testing ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/testing)
- [ Changelog ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/changelog)
- [ Support us ](https://spatie.be/docs/laravel-mailcoach-mailer-go/v1/support-us)

  Laravel-mailcoach-mailer-go 
=============================

 Send transactional mail using Mailcoach in Laravel Go 

### Useful links

- [Repository](https://github.com/spatie/laravel-mailcoach-mailer-go)
- [Discussions](https://github.com/spatie/laravel-mailcoach-mailer-go/discussions)

Introduction
------------

[Mailcoach](https://mailcoach.app) is an affordable platform for all things mail. It can send campaigns to lists of any size. It also provides flexible email automation to set up drip campaigns and more.

You can also use Mailcoach to send transactional mails. This package contains a driver so you can send any Laravel Go mailable through Mailcoach.

```
func sendOrder(ctx context.Context) error {
    return mail.To(mail.Addr("john@example.com")).Send(ctx, OrderShipped{})
}
```

On Mailcoach, you can see an archive of sent mails. If you activated the feature, you can also see the opens and clicks of all transactional mails. It's possible to resend any transactional mail straight from the Mailcoach UI.

You can create email templates on Mailcoach and use those templates in your app. Marketeers can write mails without a developer needing to make code changes.

This is how you would use a Mailcoach template in a mailable:

```
type OrderShipped struct{}

func (OrderShipped) Build() mail.Message {
    return mail.Message{
        Options: []mail.TransportOption{mailcoachmailer.Options{
            MailName: "name-of-your-mailcoach-template",
            Replacements: map[string]any{"placeholderName": "placeHolderValue"},
        }},
    }
}
```

Start with [installation and setup](installation-and-setup), then read [usage](usage) for notifications and other mail options.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
