Po wypełnieniu formularz (scrren poniżej) skierowana jest do mnie czyli do odbiorcy. Ale adres e-mail który podejemy podczas wypełnienia tego formularza nie pojawia się ten co ma być tylko adres e-mail serwera głównego po przez który przechodzi konto tzn. nazwa_konta_na_serwerze@subdomena_serwera.domena_glownaserwera.pl
A powinien być mail który wpisałem.
Ostatnio na serwerze w nazwa.pl był ten formularz i nie było problemu a jak przeniosłem do innego hostingodawcy to właśnie tak się pojawia.
Czy możecie państwo podpowiedzieć co tu można zrobić?

form.php
<?php // you MUST include the config.php file before your form include 'mail/config.php'; // You can edit the form fields below if you like // but you must leave intact all parts which are indicated // with comments ?> <!-- if you want to use basic JavaScript validation, keep the JS file call below --> <script src="mail/validation.js"></script> <script> // SPECIFY ALL REQUIRED FIELDS AND // SEE validation.js for other options required.add('imie_nazwisko', 'NOT_EMPTY'); required.add('email', 'EMAIL'); required.add('tesc', 'NOT_EMPTY'); required.add('telefon', 'NOT_EMPTY'); required.add('answer_out', 'NUMERIC'); </script> <link rel="stylesheet" type="text/css" href="mail/form_style.css" /><style type="text/css"> </style><form name="fcform2" method="post" action="mail/process_form.php" onsubmit="return validate.check()"> <div id="fcf2"> <div class="r"> <label for="imie_nazwisko" class="req">Imię i Nazwisko: <em>*</em></label> <span class="f"> <input type="text" name="imie_nazwisko" size="30" id="imie_nazwisko" onBlur="trim('imie_nazwisko')"> </span> </div> <div class="r"> <label for="email" class="req">E-mail adres: <em>*</em></label> <span class="f"> <input type="text" name="email" size="30" id="email" onBlur="trim('email')"> </span> </div> <div class="r"> <label for="telefon"><strong>Telefon:</strong> <span class="req"> <em>*</em></span></label> <span class="f"> <input type="text" name="telefon" size="30" id="telefon" onBlur="trim('telefon')"> </span> </div> <div class="r"> <label for="tesc" class="req">Wiadomość: <em>*</em></label> <span class="f"> <textarea cols="25" rows="3" name="tesc" id="tesc" onBlur="trim('tesc')"></textarea> </span> </div> <!-- the section below MUST remain for the magic to work --> <!-- although feel free to change the style / layout --> <div class="r"> <span class="f"> <input type="text" name="answer_out" size="6" id="answer_out" onBlur="trim('answer_out')"> Podaj wynik działania </span> </div> <!-- section above must remain --> <div class="sp"> </div> <?php echo '<div align="center" style="color:#000000;font-weight:bold">'.$confirmation_message.'</div><br />'; } ?> <div align="center"> <input type="submit" value="Wyślij"> </div> </div> <!-- the 2 hidden fields below must REMAIN for the magic to work --> <!-- above 2 hidden fields MUST remain --> </form>
process_form.php
<?php // THIS CODE IS KEPT LINEAR FOR EASE OF USER UNDERSTANDING include 'config.php'; // set-up redirect page if($send_back_to_form == "yes") { $redirect_to = $form_page_name."?done=1"; } else { $redirect_to = $success_page; } /* THIS IS THE NEW FORM VALIDATION SECTION */ include 'validation.class.php'; // function to handle errors function error_found($mes,$failure_accept_message,$failure_page) { if($failure_accept_message == "yes") { } else { $qstring = ""; } $error_page_url = $failure_page."".$qstring; } /* SET REQUIRED */ $reqobj = new required; // ADD ALL REQUIRED FIELDS TO VALIDATE! $reqobj->add("imie_nazwisko","NOT_EMPTY"); $reqobj->add("email","EMAIL"); $reqobj->add("tesc","NOT_EMPTY"); $reqobj->add("telefon","NOT_EMPTY"); $reqobj->add("answer_out","NUMERIC"); $out = $reqobj->out(); $val = new validate($out, $_POST); if($val->error) { $er = $val->error_string; error_found($er,$failure_accept_message,$failure_page); } // check for any human hacking attempts class clean { function comments($message) { $this->naughty = false; $this->message = $message; foreach($bad as $b) { $this->naughty = true; } } // check for HTML/Scripts $this->naughty = true; } } } // class /* validate the encrypted strings */ $dec = false; $valid = false; if($dec == true) { $valid = true; } else { $er = "Nieprawidlowo wpisales dane.<br />$dec"; error_found($er,$failure_accept_message,$failure_page); } // check the spam question has the correct answer $ans_one = $_POST['answer_out']; $fa = new encdec; $ans_two = $fa->decrypt($_POST['answer_p']); if($ans_one === $ans_two) { $valid = true; } else { $er ='Twoj wynik dzialania jest nieprawidlowy.'; error_found($er,$failure_accept_message,$failure_page); } if($valid) { $from = $_POST['email']; // loop through all form fields submitted // ignore all fields used for security measures foreach($_POST as $field_name => $field_value) { if($field_name == "answer_out" || $field_name == "answer_p" || $field_name == "enc") { // do not email these security details } else { // run all submitted content through string checker // removing any dangerous code $ms = new clean; $ms->comments($field_value); $is_naughty = $ms->naughty; $this_val = $ms->message; $email_message .= $field_name.": ".$this_val."\n\n<br><br>"; } } if($is_naughty) { if($accept_suspected_hack == "yes") { // continue } else { // pretend the email was sent } $email_subject = $email_suspected_spam; } // create email headers $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . $headers = "Content-Type: text/html; charset=utf-8\r\n"; // send the email // redirect } } else { echo "register globals may be on, please switch this setting off (look at php.net for details, specifically the ini_set() function )"; } else { } } ?>