Use mail() function instead of SMTP

Hello,
For a simple contact form I would like to use the mail() function instead of SMTP.
Is it possible to use the mail() function with Trellis and Bedrock ?

I just setup WP MAIL SMTP with “Use the PHP mail() function to send emails.” option and i get the “Could not instantiate mail function.” error on my staging and production server.

On my dev server with the same slack “Trellis/bedrock” it’s working…

Any idea ?

3 Likes

I am looking for solution too.

I just discovered that Trellis is using SSMTP, so I tried to replace sendmail path.

I tried this, but it doesn’t work.
php_sendmail_path: "/usr/sbin/sendmail -t -i"

Problem is that SSMTP is creating symlink for sendmail, so I can’t define path manually in trellis configuration. Does anyone know about some workaround?

1 Like

I need help with this, too. I don’t want smtp to send the mails but postfix.