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
Hello,
Thank you for your message.
We are not experiencing any particular problems with the operation of our services at present or since last Friday.
The problem may be due to your Internet connection, an IP block or the FTP transfer software you are using.
So that an agent can analyze your problem in detail and find a solution for you, I invite you to contact our technical support from the "support" section of your customer area.
Sincerely, The LWS team