Trying to send mail using PHP via Postfix

So I’m trying to set up a contact form on my website. It’s an Ubuntu server running Nginx. Whenever I submit the message, it throws back a 502 error. I’ve got the listen location setup properly on Nginx and PHP and i set the sendmail path for PHP already. I don’t know what else to do


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I had the wrong username as seen here