LAMP server not sending email

My knowledge is pretty strong in the area of web dev languages/syntax (js, jquery, html, css, slq and php) thanks to sitepoint and forums like this one, but when it comes to servers, I still know very little. So please excuse me if the phrasing of my issue sounds a bit ignorant. I’ll do my best…

I’ve installed MAMP and WAMPServer before on local machines and never had a problem with PHP’s email() function or phpMailer – never even had to address the issue; these email features have just always worked.

Now I’ve moved my code onto a production server (I’m using a Hetzner server installed with LAMP), and I cannot get any email activity whatsoever. My php code runs fine – I’m not getting any errors from email() or phpMailer during troubleshooting. There’s simply never an email waiting for me in the inbox.

Suggestions on where to begin? Questions to ask? Books or tutorials I should read. I hadn’t planned on delving into the subject of servers as of yet, but I learn best when I’m trying to solve one of my own problems. Any thoughts would be appreciated.

Not sure about phpmailer but the similar swiftmailer has extended error logging plus the capability to send via a normal smtp account, which will allow checking of the response to the connection. Beyond that, check your mail daemon logs for clues.