Przeniosłem stronę z serwera IIS na Apache, teraz wywala mi się formularz zgłoszeniowy bo oczywiście używano biblioteki do maili dla Windows. Skrypt wygląda następująco:
<?php //*** Start the session. *** //*** Define Upload Temp Directory *** //*** Initialize the loop count *** No File $loopcount = 0; $loopcount = 1; } { $loopcount = 2; } { $loopcount = 3; } //*** Decide whether there is a file to upload *** if ($loopcount == 0){ //*** Create mail body *** $msg_body = $_REQUEST['txtFname'] . "<br>"; $msg_body .= $_REQUEST['txtCname'] . "<br>"; $msg_body .= $_REQUEST['txtTitle'] . "<br>"; $msg_body .= $_REQUEST['txtEmail'] . "<br>"; $msg_body .= $_REQUEST['txtPhone'] . "<br>"; $msg_body .= $_REQUEST['txtAdd1'] . "<br>"; $msg_body .= $_REQUEST['txtAdd2'] . "<br>"; } $msg_body .= $_REQUEST['txtCity'] . ", " . $_REQUEST['State'] . ", " . $_REQUEST['txtZip'] . "<br>"; $msg_body .= $_REQUEST['Country'] . "<br><br>"; $msg_body .= "Languages: " . $_REQUEST['Slang'] . " TO " . $_REQUEST['TLang'] . "<br><br>"; $msg_body .= "Date Required: " . $_REQUEST['dd'] . "-" . $_REQUEST['mm'] . "<br><br>"; $msg_body .= "Notes: " . $_REQUEST['txtNotes'] . "<br><br>"; } $msg_body .= "Worked with us before: " . $_REQUEST['b4now'] . "<br>"; $msg_body .= "How you found us: " . $_REQUEST['found'] . "<br>"; $msg_body .= "Keyword used or referral: " . $_REQUEST['keyword'] . "<br>"; $msg_body .= "PPC Point of entry: " . $_SESSION['page'] . "<br>"; } //*** Generating Mail CDO *** //*** Email used for Live Form *** $message->To = 'services@example.com'; $message->From = 'dedicated@example.com'; $message->Subject = 'Web submission: | From www.example.com'; $message->HTMLBody = $msg_body; $message->Send(); header("Location: <a href="http://www.example.com/Translation-Services/Free-Quote-Confirmation.php"%3b%29;" target="_blank">http://www.example.com/Translation-Service...ion.php");</a> } else{ //*** Define Mail to be sent *** //*** Create mail body *** $msg_body = $_REQUEST['txtFname'] . "<br>"; $msg_body .= $_REQUEST['txtTitle'] . "<br>"; $msg_body .= $_REQUEST['txtCname'] . "<br>"; $msg_body .= $_REQUEST['txtEmail'] . "<br>"; $msg_body .= $_REQUEST['txtPhone'] . "<br>"; $msg_body .= $_REQUEST['txtAdd1'] . "<br>"; $msg_body .= $_REQUEST['txtAdd2'] . "<br>"; } $msg_body .= $_REQUEST['txtCity'] . "<br>"; $msg_body .= $_REQUEST['State'] . "<br>"; $msg_body .= $_REQUEST['Country'] . "<br>"; $msg_body .= $_REQUEST['txtZip'] . "<br><br>"; $msg_body .= "Languages: " . $_REQUEST['Slang'] . " TO " . $_REQUEST['TLang'] . "<br><br>"; $msg_body .= "Date Required: " . $_REQUEST['dd'] . "-" . $_REQUEST['mm'] . "<br><br>"; $msg_body .= "Notes: " . $_REQUEST['txtNotes'] . "<br><br>"; } $msg_body .= "Worked with us before: " . $_REQUEST['b4now'] . "<br>"; $msg_body .= "How you found us: " . $_REQUEST['found'] . "<br>"; $msg_body .= "Keyword used or referral: " . $_REQUEST['keyword'] . "<br>"; $msg_body .= "PPC Point of entry: " . $_SESSION['page'] . "<br>"; } //*** Loop through for file upload *** for ($i = 1; $i <= $loopcount; $i++) { $file_from_field = "THEFILE-" . $i; $msg_body .= "Link to File: <a href=\"http://www.example.com/php-upload-fold/" . $f_name_no_spaces . "\">Click here</a><br><br>"; $uploaded_file_flag = 1; } } if ($uploaded_file_flag == 1){ //*** Generating Mail CDO *** $message = new COM('CDO.Message'); //*** Email used for Live Form *** $message->To = 'services@example.com'; $message->From = 'dedicated@example.com'; $message->Subject = 'Web submission: | From www.example.com'; $message->HTMLBody = $msg_body; $message->Send(); header("Location: <a href="http://www.example.com/Translation-Services/Free-Quote-Confirmation.php"%3b%29;" target="_blank">http://www.example.com/Translation-Service...ion.php");</a> } else{ header("Location: <a href="http://www.example.com/nogo.html"%3b%29;" target="_blank">http://www.example.com/nogo.html");</a> } } ?>
Oczywiście domyślam się że chodzi o tą funkcję:
Pytanie jakiej biblioteki i jak użyć żeby się nie narobić przy przerabianiu?