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

As a standalone app

On this page:

The easiest way to get started using Mailcoach on Vapor is by using our prepared standalone application. This standalone app is a regular Laravel app, where Mailcoach has been preinstalled with. It also comes with basic user management.

You can add Mailcoach to your own application that’s running in Vapor. If so, please refer to the the dedicated instructions.

Getting a license

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

Creating the application

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.

composer create-project spatie/Mailcoach

During the execution of this command Composer can 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.

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.