Here is the code I have in contact.php:

<?php
    mail('philovesdogs@gmail.com','sdf','sadfsad');
    echo 'Ok';
?>

I put the echo in just to make sure that PHP was working on the page. I uploaded the page to my LAMP server and opened the page. I saw 'ok'. I checked my email however (and my Spam folder) and no email was sent. Any suggestions? Thanks!

You'll first have to set up your LAMP mail function for it to work.

Does your lamp server have have sendmail installed and running? Do you have any other mail scripts on your lamp server that do work?

It's possible your server has been blocked for spam reasons.

No, I don't have a mail server running! I've been scanning the internet to try to find out how to get it up, but everything I've tried isn't working! How do I configure sendmail?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.