Jump to content

error when trying to send email through a web form...


cluce

Recommended Posts

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
Share on other sites

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 = "ecooper@rwer.com";
$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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.