Your Server

scripting website in PHP to send e mails?

ii'm trying to send out 2 e mails from a form. one will be sent to the web administrator the other to a user, however before i even get anywhere i have this error message Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:\xampp\htdocs\FinalTest\basket.php on line 75 Mail Sent. what does this mean how do i fix it. i'm using XAMPP on a windows XP machine this is my code so far <div id="detailsform"> <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> <form name="personaldetails" method="post" action="#" onSubmit="return ValidateForm()"> <p>Forename:<INPUT type='text' name='forename' size=20 maxlength=20></p> <p>Surname:<INPUT type='text' name='surname' size=20 maxlength=20></p> <p>Address Line 1:<INPUT type='text' name='address1' size=20 maxlength=100></p> <p>Address Line 2:<INPUT type='text' name='address2' size=20 maxlength=30></p> <p>Address Line 3:<INPUT type='text' name='address3' size=20 maxlength=30></p> <p>Post Code:<INPUT type='text' name='postcode' size=8 maxlength=8></p> <p>E-Mail Address:<INPUT type='text' name='email' size=20 maxlength=100></p> <p>cardtype:<select> <option>mastercard</option> <option>visa</option> <option>maestro</option> <option>solo</option> </select></p> <p>Bank Account Number:<INPUT type='text' name='banknumber' size=15 maxlength=15></p> <p>Issue Number:<INPUT type='text' name='issue' size=2 maxlength=2></p> <p>Expiry Date:<INPUT type='text' name='expirydatemonth' size=2 maxlength=2>/<INPUT type='text' name='expirydateyear' size=2 maxlength=2></p> <p>security code (last 3 digits on back of card):<INPUT type='password' name='issue' size=3 maxlength=3></p> <input type="submit" name="Submit" value="Submit"> </form> </div> </div>

Public Comments

  1. the SMTP server your trying to use does not like the the webserver you're trying to send e-mail from.
  2. you can't send email from your own xampp server; it's not set up with MX records like a real web server. usually uploading to a live server with your host will resolve that error
Powered by Yahoo! Answers