Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

magusd's avatar

Laravel 5 with postfix aka mail()

Do anyone have any experience using laravel to send emails using the server's default mailing system?

I am building a newsletter feature for a client and the monthly cost for something like mailchimp would be 75$/month.

I've already configured my node on digital ocean to send/receive emails using postfix but I have no idea how to use it through laravel. It only gives me the option to setup a smtp connection.

0 likes
3 replies
bobbybouwmann's avatar

I believe you only need to set the email driver to sendmail in your configuration ;)

magusd's avatar

Hey @bobbybouwmann , thanks for your answer. I tried it and it didn't work. I wrote a mail.php script with the minimum parameters, ran it and the email was captured by mailcatcher. But in laravel it didn't work. Am I missing any dependencies? Btw, mailtrap.io works but it's using smtp.

bobbybouwmann's avatar

Sorry, my fault. If you use sendmail, you also need to have sendmail installed on your server or locally for development purposes.

The alternative is using the mail driver, but that requires you to fill in the correct information in the config/mail.php file.

You can of course use any third party service, most of them offer you around 10k emails for free per month ;)

Please or to participate in this conversation.