You are currently reading the documentation for v6, while the latest version is v8.

As a standalone app

On this page:

You can create a new Laravel application with Mailcoach preinstalled into using Composer. This application will also have authorization screens (login, password reset) and user management.

Getting a license

In order to install Mailcoach, you’ll need to get a license first.

Creating the application

You can create the application with Mailcoach pre-installed using this command

composer create-project spatie/mailcoach-vapor

During the execution of this command Composer will ask for a user and a password. The user is the email address
of your spatie.be account. The password is the key of your Mailcoach license.

Configuring vapor.yml

In vapor.yml you should set the id and name keys to the id and name of your Vapor project.

Mailcoach uses a database to store information. Make sure you have a provisioned a database in Vapor and specify its name in the database key. in vapor.yml.

Install npm assets

You’ll need to run npm install the first time you create your project.

Deploying to Vapor

With that setup out of the way, you should now be able to deploy the application to vapor

vapor deploy production

Creating the first user

After the deployment is complete, you should create an initial user.

This can be done by executing vapor command production and give it this command.

mailcoach:make-user --username=<choose-your-username> --email=<choose-your-email>  --password=<choose-your-password> 

New users can be made on the users screen in mailcoach.

Users screen

Configure the email sending service

Now that you are logged in you must configure the email sending service you’d like to use. Here are set up instructions for:

Or you can set these up through the interface.

⚠️ You should configure a mailer before creating your first email list.

Making sure everything works

Before sending out a real campaign, we highly recommend creating a small email list with a couple of test email addresses and send a campaign to it. This way, you can verify that sending mails, and the open & click tracking are all working correctly.

Introduction