Skip to content

Instantly share code, notes, and snippets.

@captbaritone
Last active February 22, 2018 23:08
Show Gist options
  • Save captbaritone/7407837 to your computer and use it in GitHub Desktop.
Save captbaritone/7407837 to your computer and use it in GitHub Desktop.
This is the mail configuration I use on Laravel to get it to send email to [MailCatcher](http://mailcatcher.me/)
<?php
return array(
// Send it mail via SMTP
'driver' => 'smtp',
// Whatever port you have MailCatcher's SMTP server running on (they suggest 1025)
'port' => 1025,
// The from address you would like your server to use
'from' => array('address' => 'info@example.com', 'name' => 'Website Mailer Name'),
// This tripped me up for a while. Laravel defaults to 'tls', but that breaks MailCatcher.
// An empty string makes it use no encryption
'encryption' => '',
// Really send mail via SMTP (even though our server is pretend)
'pretend' => false,
);
@JacobBennett
Copy link

What are you using for the SMTP HOST ADDRESS portion of the config?

@wdmtech
Copy link

wdmtech commented Mar 18, 2015

I know this was posted over a year ago, but just used this myself -- @JacobBennett, you just need to add the line:

'host' => '127.0.0.1',

Cheers for sharing this gist @captbaritone!

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