I am receving errors when emailing from php!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

I am receving errors when emailing from php!

Postby jchord » 13. May 2005 04:32

hi i have a simple html doc called "mail.html it looks like this:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- Created on May 12, 2005 10:55:06 PM -->


   <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

      <form action="mail2.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br><br>
<textarea name="comments"></textarea><br><br>
<input type="submit" value="Submit">


the mail2.php that it is conected to goes like this:

Code: Select all
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";

when i try to use the mail.html to email me (after filling it out in it's entirty) it says:
Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:\apachefriends\xampp\htdocs\mail2.php on line 7

followed closely by my custom error message.
There was a problem sending the mail. Please check that you filled in the form correctly.

Can someone tell me what this means and how to fix it.

thank you,
John Berube
Posts: 5
Joined: 13. May 2005 04:06

Postby sckoh » 13. May 2005 11:52

It means that the ISP does not allow you to relay emails and asks you to login to their webpage.

Nowadays, mosts of ISP do not allow sending emails through remote access like you, due to spam mails.
In this case you can do it after installing an application like "1st SMTP".
User avatar
Posts: 67
Joined: 01. March 2005 02:16
Location: Washington DC

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests