Witam. Czy może mi ktoś pomóc w zmianie kodowania emaili wysyłanych przez formularz? Próbowałem już rożnych metod ale nie pomagają...
<?php
case "contact_us-s":
$siteclass->templ->page_title .= "Kontakt {$siteclass->info->config['site_name']}";
if ($siteclass->funcs->is_null($siteclass->input->post_vars['email_address']) == true || $siteclass->funcs->is_null($siteclass->input->post_vars['message_body']) == true || $siteclass->funcs->is_null($siteclass->input->post_vars['captcha_code']) == true) {
$siteclass->templ->error("Proszę wypełnić wszystkie pola.", true);
} elseif ($siteclass->db->total_rows($siteclass->db->query("SELECT * FROM `site_captcha_sessions` WHERE `captcha_code` = '{$siteclass->input->post_vars['captcha_code']}';")) != 1) {
$siteclass->templ->error("Wpisany kod jest niepoprawny.");
} elseif ($siteclass->funcs->valid_email($siteclass->input->post_vars['email_address']) == false) {
$siteclass->templ->error("Podany adres email jest niepoprawny.");
} else {
$siteclass->db->query("DELETE FROM `site_captcha_sessions` WHERE `captcha_code` = '{$siteclass->input->post_vars['captcha_code']}';");
$siteclass->templ->templ_vars[] = array( "SITE_NAME" => $siteclass->info->config['site_name'],
"EMAIL_ADDRESS" => $siteclass->input->post_vars['email_address'],
"EMAIL_BODY" => strip_tags(str_replace( "<br />", "\n" , $siteclass->input->post_vars['message_body'] )), );
$message_body = $siteclass->templ->parse_template("contact", "contact_us_email");
$email_headers = "From: {$siteclass->input->post_vars['email_address']} r\n";
$email_headers .= "Reply-To: {$siteclass->input->post_vars['email_address']} r\n";
$email_headers .= 'Content-ty: text/html; \n';
if (mail($siteclass->info->config['email_out'], " ({$siteclass->info->config['site_name']}) - Wiadomość od Użytkownika serwisu", $message_body, $email_headers) == true) { $siteclass->templ->message("Wiadomość do administracji {$siteclass->info->config['site_name']} została wysłana poprawnie. <br>Postaramy się odpowiedzieć na nią w ciągu 48 godzin. <br /><br /> <a href=\"index.php\">Strona główna</a>", true);
} else {
$siteclass->templ->error("Wystąpił nieznany problem podczas wysyłania emaila.");
}
}
break;
?>
Z góry thx