Jump to content

mail() doesn't work for one of websites... any fix?


Recommended Posts

Hi,
I have several websites and for one of them, when I try to use the contact form and send a message the mail() fucntion doesn't work... For the rest, everything is OK. What should I do? What do I need to check/compare in order to make it work?

Thank you,
Paul

PS: I do not remember if the function ever worked..

Link to comment
Share on other sites

There's a simple way to make sure what's wrong, your hosting's email setting or your prestashop's email setting

Just create a php file, paste this code (change $to 's value with your email) and run the file

<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?> 



If the email wont sent, just call your hosting provider :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...