Your contact form doesn't work and no email is received?

Procédure

Check that the PHPMail() function is active on your client interface

1. log in to your web hosting management interface and click on the "PHP configuration" button

Your contact form doesn't work and no email is received?

2. Check that the PHPMail() function is set to"ON".

Your contact form doesn't work and no email is received?


Checking the PHPMail() function using a PHP script

You can test the PHPMail() function using a small script to be set up on a PHP page.

The script will give you confirmation that the email has been sent on the PHP page and will allow you to check that the email has been received at the destination inbox.

<?php //Testing the mail() function; // *** To be configured by you $to = "monemail@gmail.com"; // Put in the receiving email $from = "monemail@domaine.ext"; // Email address of the recipient of the email, the one attached to your LWS domain.

// Do not modify the lines below $JOUR = date("Y-m-d"); // Day the email was sent $HEURE = date("H:i"); // Time the email was sent $Subject = "Test Mail - $JOUR $HEURE"; $mail_Data = ""; $mail_Data .= " \n"; $mail_Data .= " \n"; $mail_Data .= " \n"; $mail_Data .= " \n"; $mail_Data .= " \n"; $mail_data .= "Simple HTML Mail : $Subject \n"; $mail_Data .= " \n"; $mail_Data .= "This is a test email from PHP's mail function \n"; $mail_Data .= "Etc. \n"; $mail_Data .= " \n"; $mail_Data .= " \n"; $headers = "MIME-Version: 1.0 \n"; $headers .= "Content-type: text/html; charset=utf-8 \n"; $headers .= "From: $from \n"; $headers .= "Disposition-Notification-To: $from \n"; // High Priority Message // ------------------------- $headers .= "X-Priority: 1"; $headers .= "X-MSMail-Priority: High"; $CR_Mail = TRUE; $CR_Mail = @mail ($to, $Subject, $mail_Data, $headers); if ($CR_Mail === FALSE) echo " ### CR_Mail=$CR_Mail - Error sending mail"; else echo " *** CR_Mail=$CR_Mail - Mail sent"; ?>


To test that the email has been sent and received, simply open the URL of the page containing your script. If it worked, you should see this:

*** CR_Mail=1 - Mail sent


If not, you will get the following return, which indicates that the PHPMail() function is deactivated on your shared hosting:

### CR_Mail=0 - Error sending mail


If the PHPMail() function is active on your client interface and the PHP script sends you "CR_Mail=0 - Error sending mail", there is a good chance that the PHPMail() function has been deactivated as a result of numerous SPAMS. If this is the case, you will need to contact Technical Support who will tell you what to do.


Check that there are no errors in the destination email address

There may be an error in the recipient's email address. To be sure, you need to check the Apache/Php logs.

1. connect to the administration of your web hosting and click on"Notfication disponibles: Cliquez ici pour les voir"".

Your contact form doesn't work and no email is received?

2. You will be able to see what the problem is. You will be able to see whether the problem is related to an email address and/or whether it is a script or contact form on a web page. In the case of a script, most of the time the problem is due to the absence of the Captcha field on the contact form.

Your contact form doesn't work and no email is received?

By clicking on the"Click here" tab on the"See the source of the email causing the problem" line, you will be able to find out more about the email in question.

Your contact form doesn't work and no email is received?

Rate this article :

3.8/5 | 4 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

5mn reading

How do I create and use an .htaccess file with the LWS Panel?

0mn reading

How to configure SMTP on a CMS

1mn reading

How do I create an htaccess file to rewrite a URL?

0mn reading

How do I update Wordpress to the latest version?


Questions sur l'article
quebec56 Il y a 739 days
pas de retour mail sur formulaires, pas d'accès à la configuration PhP mail (on/off)
See the
1 answers
fabrice-LWS - Il y a 738 days
Bonjour, la fonction PHPMail() était bloquée pour l'erreur L-SPAM20. Vous pouvez avoir plus d'informations concernant cette erreur en vous rendant sur la page suivante: https://aide.lws.fr/a/1099 . Le déblocage de la fonction a été effectué.
Utile ?

Ask the LWS team and its community a question