i have a problem similar to this one, but mainly the problem is that my php connects to the mails server, but disconnects immediately.
for example: here is the log of the mail server:
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2007-08-07 15:00:23
#Fields: date time c-ip s-sitename s-computername s-ip s-port cs-method sc-bytes cs-host
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 HELO 32 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 MAIL 39 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 31 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 27 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 QUIT 57 -
in this case the mail() function connected, but no email was sent. then i tried it with outlook express just to check what the log would read, and here is what i got :
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2007-08-07 14:53:27
#Fields: date time c-ip s-sitename s-computername s-ip s-port cs-method sc-bytes cs-host
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 HELO 32 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 MAIL 43 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 31 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 DATA 125 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 QUIT 57 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 30 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 EHLO 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 55 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 MAIL 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 RCPT 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 DATA 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 44 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 QUIT 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 68 -
which shows that it even connected to the remote server.
anyone has any idea what the problem is? here is the code in use :
Expand|Select|Wrap|Line Numbers
- <?php
- /*variables*/
- $name = $_POST["name"];
- $surname = $_POST["surname"];
- $sex = $_POST["sex"];
- $address = $_POST["address"];
- $home = $_POST["home"];
- $mobile = $_POST["mobile"];
- $email = $_POST["email"];
- $dob = $_POST["dob"];
- $status = $_POST["status"];
- $overseas = $_POST["overseas"];
- $from1 = $_POST["from1"];
- $to1 = $_POST["to1"];
- $company1 = $_POST["company1"];
- $position1 = $_POST["position1"];
- $res1 = $_POST["res1"];
- $from2 = $_POST["from2"];
- $to2 = $_POST["to2"];
- $company2 = $_POST["company2"];
- $position2 = $_POST["position2"];
- $res2 = $_POST["res2"];
- $other = $_POST["other"];
- $cert = $_POST["cert"];
- $lang = $_POST["lang"];
- $educ = $_POST["educ"];
- $comp = $_POST["comp"];
- $info = $_POST["info"];
- $interests = $_POST["interests"];
- $agreement = $_POST["agreement"];
- $subject = "Curriculum Vitae of " . $surname .", " .$name ."";
- /*received email form*/
- $message = "Standard Registration Form" . "\n\n";
- $message .= "Name: " . $name . "\n";
- $message .= "Surname: " . $surname . "\n";
- $message .= "Sex: " . $sex . "\n";
- $message .= "Address: " . "\n";
- $message .= $address . "\n";
- $message .= "Home Number: " . $home . "\n";
- $message .= "Mobile Phone Number: " . $mobile . "\n";
- $message .= "Email Address: " . $email . "\n";
- $message .= "Date of Birth: " . $dob . "\n";
- $message .= "Status: " . $status . "\n";
- $message .= "Willing to Work Overseas: " . $overseas . "\n\n";
- $message .= "Employment History / Experience" . "\n\n";
- $message .= "From: " . $from1 . " To: " . $to1 . "\n";
- $message .= "Company: " . $company1 . "\n";
- $message .= "Position Held: " . $position1 . "\n";
- $message .= "Resposibilities: " . "\n";
- $message .= $res1 ."\n\n";
- $message .= "From: " . $from2 . " To: " . $to2 . "\n";
- $message .= "Company: " . $company2 . "\n";
- $message .= "Position Held: " . $position2 . "\n";
- $message .= "Resposibilities: " . "\n";
- $message .= $res2 ."\n\n";
- $message .= "Other Employment: " . "\n";
- $message .= $other ."\n\n";
- $message .= "Training and Certificates: " . "\n";
- $message .= $cert ."\n\n";
- $message .= "Languages: " . "\n";
- $message .= $lang ."\n\n";
- $message .= "Education History: " . "\n";
- $message .= $educ ."\n\n";
- $message .= "Computer Skills: " . "\n";
- $message .= $comp ."\n\n";
- $message .= "Other Information: " . "\n";
- $message .= $info ."\n\n";
- $message .= "Interests: " . "\n";
- $message .= $interests ."\n\n";
- $message .= "Agreement: " . $agreement . "\n";
- /*address to whom form will be sent*/
- $sendTo = "__MUNGED__";
- $headers = "From: Contact From <" . $email . ">" . "\r\n" . "Reply-To: " . $email . "\r\n" . "Bcc: " . $Bcc . "\r\n";
- mail($sendTo, $subject, $message, $headers);
- /*change this according to page following confirmation of sending of CV*/
- header ("Location: home.html")
- ?>