PHP email form

I’ve been tinkering with PHP trying to make a functioning email form for service requests. My code seems right, but I never receive an email. Can anyone help me with a simple PHP email form for requesting services? Any help will be greatly appreciated.

If you think your code is fine, you may need to check your spam folder. Here is a simple form:

<?php $msg = ''; if($_POST['message']!=''){ if(mail('[email protected]','Subject line...',$_POST['message'])){ $msg = 'Youe message has been sent.'; } else{ $msg = 'Error: cannot send message.'; } } ?> <?php echo '


' ?> Enter your message:

Sponsor our Newsletter | Privacy Policy | Terms of Service