Rate this article :
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Procédure
This error occurs when the e-mail address entered in your code is not authorised to send e-mails from the SMTP server.
To send an email in PHP, via a form, you need to use the following code:
$to = "test@test.com"; $from = "test@votredomaine.com"; $entete = "MIME-Version: 1.0"; $entete .= "Content-type: text/html; charset=iso-8859-1\r\n"; $entete .= "From: $from < $from >\r\n"; $entete .= "Reply-to: $from\r\n"; $entete .= "X-Mailer: PHP\r\n"; $entete .= "X-Priority: 1\r\n"; $entete .= "Return-Path: < $from > \r\n"; $msg = "test\r\n"; $sujet = "*** Test Mail ***\r\n"; $res = (mail($to,$sujet,$msg,$entete)); if (true === $res) { $texte = "Mail sent to"".$to."\"\n"; printf (nl2br("$texte")); } else { $texte = "**** ERROR : PROBLEM SENDING MAIL ! ****"; printf (nl2br("$text")); }
1. On shared hosting, the sender address ($from in the code) must be the one attached to your domain. The address must also be different from that of the recipient, otherwise you will see the error message 542( You are not allowed) appear and your email will not be sent.
2. If you wish to use a sender address other than the one attached to your domain, you will need to subscribe to a virtual server. We invite you to discover our offers from this link: VPS server (from €9.99/month excluding VAT) .
Rate this article :
This article was useful to you ?
Yes
No
0mn reading
Cloudflare Error 524 : A timeout occured
3mn reading
How to correct a 500 error on your site with LWS Panel
10mn reading
How do I correct HTTP error codes?
0mn reading
404 error, what it is and how to correct it
Bonjour,
Je vous remercie pour votre message.
Nous ne rencontrons pas de problèmes particuliers avec le fonctionnement de nos services actuellement ou depuis vendredi dernier.
Ce problème peut venir de votre connexion internet, d'un blocage IP ou du logiciel de transfert FTP utilisé.
Afin qu'un agent puisse analyser en détail votre problème et vous trouver une solution, je vous invite à contacter notre support technique depuis la rubrique "assistance" de votre espace client.
Cordialement, L'équipe LWS