Skip to content

Instantly share code, notes, and snippets.

@angusfretwell
Created January 22, 2016 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angusfretwell/890ac3608ab69c760828 to your computer and use it in GitHub Desktop.
Save angusfretwell/890ac3608ab69c760828 to your computer and use it in GitHub Desktop.
Install MailCatcher in Laravel Homestead
apt-get install -y ruby1.9.1-dev
gem install mailcatcher
echo "description \"Mailcatcher\"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
pre-start script
bash << \"EOF\"
mkdir -p /var/log/mailcatcher
chown -R vagrant /var/log/mailcatcher
EOF
end script
exec su - vagrant -c 'mailcatcher -f --no-quit --http-ip=0.0.0.0 >> /var/log/mailcatcher/mailcatcher.log'
" > /etc/init/mailcatcher.conf
chmod +x /etc/init/mailcatcher.conf
@angusfretwell
Copy link
Author

Example .env configuration:

MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_ENCRYPTION=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment