cluce Posted April 2, 2008 Share Posted April 2, 2008 I am trying to send email through a web form and I get an error. I had just migrated to IIS server and was on a unix server. can someone tell me what this erro means? Warning: mail() [function.mail]: SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in C:\Inetpub\vhosts\kilopak.com\httpdocs\o_application.php on line 46 Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\kilopak.com\httpdocs\o_application.php:46) in C:\Inetpub\vhosts\kilopak.com\httpdocs\o_application.php on line Link to comment https://forums.phpfreaks.com/topic/99192-error-when-trying-to-send-email-through-a-web-form/ Share on other sites More sharing options...
cluce Posted April 2, 2008 Author Share Posted April 2, 2008 I did read somewhere it may be becasue the web server is set for SMTP authentication and it is requiring it. IS this true? here is my code for the form which worked before: <?php session_start(); $date = trim(strip_tags($_POST['date'])); $lastname = trim(strip_tags($_POST['lastname'])); $middle = trim(strip_tags($_POST['middle'])); $firstname = trim(strip_tags($_POST['firstname'])); $address = trim(strip_tags($_POST['address'])); $address_continue = trim(strip_tags($_POST['address_continue'])); $city = trim(strip_tags($_POST['city'])); $state = trim(strip_tags($_POST['state'])); $zip = trim(strip_tags($_POST['zip'])); $phone = trim(strip_tags($_POST['phone'])); $alternate = trim(strip_tags($_POST['alternate'])); $email = trim(strip_tags($_POST['email'])); $position = trim(strip_tags($_POST['position'])); $referred = trim(strip_tags($_POST['referred'])); $coverletter = trim(strip_tags($_POST['coverletter'])); $resume = trim(strip_tags($_POST['resume'])); if (empty($lastname) or empty($middle) or empty($firstname) or empty($address) or empty($city) or empty($state) or empty($zip) or empty($phone) or empty($email) or empty($position)) { $_SESSION['validate'] = "<font color = red>Please fill in all the required fields</font>"; header ("Location: o_application.php"); }else{ $to = "[email protected]"; $subject = "Kilo-Pak Online Application"; $body ="\n\n Date: ".$date." \n\n Last Name: ".$lastname." \n\n Middle: ".$middle." \n\n First Name: ".$firstname." \n\n Address: ".$address." \n\n : ".$address_continue." \n\n City: ".$city." \n\n State: ".$state." \n\n Zip: ".$zip." \n\n Phone Number: ".$phone." \n\n Alternate Phone: ".$alternate." \n\n Email: ".$email." \n\n Position: ".$position." \n\n Reffered by: ".$referred." \n\n Cover letter: ".$coverletter." \n\n Resume: ".$resume.""; mail ($to, $subject, $body); header("Location: thanks.htm"); } ?> Link to comment https://forums.phpfreaks.com/topic/99192-error-when-trying-to-send-email-through-a-web-form/#findComment-507515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.