JJohnsenDK Posted November 20, 2006 Share Posted November 20, 2006 HeyIm trying make an email function on my website. Im using the mail() function in php. When i try the script i get this error:Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:\Programmer\xampp\htdocs\katrinelund\mail.php on line 30What does this mean? i run on localhost and using the XAMPP software, which are using Mercury as SMTP server.Hope someone can help :) Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/ Share on other sites More sharing options...
JJohnsenDK Posted November 20, 2006 Author Share Posted November 20, 2006 anyone? Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127445 Share on other sites More sharing options...
kenrbnsn Posted November 20, 2006 Share Posted November 20, 2006 Your mail server is not configured correctly or you are coding the mail() function wrong.Please post the code you are trying to use.Ken Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127477 Share on other sites More sharing options...
JJohnsenDK Posted November 20, 2006 Author Share Posted November 20, 2006 Ofcause, here it is:[code]<?phpif (isset($_POST['navn']) && isset($_POST['besked'])){ if (empty($_POST['navn'])) { echo "Du skal indtaste dit navn"; } elseif (empty($_POST['besked'])) { echo "Du skal indtaste en besked"; } else { $modtager = "[email protected]"; $emne = "Mail fra en bruger"; $besked = "Hej, du har modtaget mail fra en bruger: \n Navn: " . $_POST['navn']. "\n Besked: " . $_POST['besked']; $header = "from:[email protected]"; mail($modtager, $emne, $besked, $header); echo "Emailen er nu sendt!"; }}?><form action="mail.php" method="post"> Navn: <br> <input type="text" name="navn" style="width: 200px;"> <br><br> Besked: <br> <textarea name="besked" style="width: 200px; height: 100px;"></textarea> <br><br> <input type="submit" value="Send mail"></form>[/code]I hope it can help Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127487 Share on other sites More sharing options...
JJohnsenDK Posted November 20, 2006 Author Share Posted November 20, 2006 Plz anyone? Is the error in the $from variable? should i write something with localhost? Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127548 Share on other sites More sharing options...
craygo Posted November 20, 2006 Share Posted November 20, 2006 can you send outgoing mail through a regular e-mail client??? Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127554 Share on other sites More sharing options...
JJohnsenDK Posted November 20, 2006 Author Share Posted November 20, 2006 I dont know... i never worked with this SMTP servers before so i dont know. How can i test it? Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127565 Share on other sites More sharing options...
JJohnsenDK Posted November 21, 2006 Author Share Posted November 21, 2006 anyone, plz... Link to comment https://forums.phpfreaks.com/topic/27861-mail-functionmail-error/#findComment-127842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.