Skip to content

Instantly share code, notes, and snippets.

@Penderis
Last active September 30, 2015 21:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Penderis/92facf866ac47827aedf to your computer and use it in GitHub Desktop.
Save Penderis/92facf866ac47827aedf to your computer and use it in GitHub Desktop.
Add mailcatcher to Scotchbox
##source http://alfrednutile.info/posts/93
Using MailCatcher http://mailcatcher.me/ I can see the emails sent by the website.
First checkout https://github.com/fideloper/Vaprobash/pull/348 to get your box ready All I did was
Log into the vagrant box and run
sudo apt-get install libsqlite3-dev
Then
sudo apt-get install ruby1.9.1-dev -y
sudo gem install mailcatcher
Then
sudo gem install mailcatcher -V
Set your mail.php config
This is found in app/config and should be copied to app/config/local so it only applies to local
#app/config/local/mail.php
<?php
return array(
'driver' => 'smtp',
'host' => '192.168.33.10',
'port' => 1025,
'from' => array('address' => 'admin@test.com', 'name' => 'Foo Bar'),
'encryption' => '',
// 'username' => null,
// 'password' => null,
);
Finally reload vagrant
vagrant reload
And start up mailcatcher inside of vagrant.
mailcatcher --ip=192.168.33.10
And you are set. http://192.168.33.10:1080 works
vagrant ssh -c 'mailcatcher --ip=192.168.42.42'
#could then alias it to run mailcatcher and login
vagrant ssh -c 'mailcatcher --ip=192.168.42.42' $T vagrant ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment