Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]zmiana kodowania emaila
kidler
post
Post #1





Grupa: Zarejestrowani
Postów: 65
Pomógł: 0
Dołączył: 9.09.2006

Ostrzeżenie: (0%)
-----


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ą...
  1. <?php
  2. case "contact_us-s":
  3.            $siteclass->templ->page_title .= "Kontakt {$siteclass->info->config['site_name']}";
  4.            
  5.            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) {
  6.                $siteclass->templ->error("Proszę wypełnić wszystkie pola.", true);
  7.            } elseif ($siteclass->db->total_rows($siteclass->db->query("SELECT * FROM `site_captcha_sessions` WHERE `captcha_code` = '{$siteclass->input->post_vars['captcha_code']}';")) != 1) {
  8.                $siteclass->templ->error("Wpisany kod jest niepoprawny.");
  9.            } elseif ($siteclass->funcs->valid_email($siteclass->input->post_vars['email_address']) == false) {
  10.                $siteclass->templ->error("Podany adres email jest niepoprawny.");
  11.            } else {
  12.                $siteclass->db->query("DELETE FROM `site_captcha_sessions` WHERE `captcha_code` = '{$siteclass->input->post_vars['captcha_code']}';");
  13.                
  14.                $siteclass->templ->templ_vars[] = array(
  15.                    "SITE_NAME"     => $siteclass->info->config['site_name'],
  16.                    "EMAIL_ADDRESS" => $siteclass->input->post_vars['email_address'],
  17.                    "EMAIL_BODY"    => strip_tags(str_replace( "<br />", "\n" , $siteclass->input->post_vars['message_body'] )),
  18.                );
  19.                
  20.                $message_body = $siteclass->templ->parse_template("contact", "contact_us_email");
  21.  
  22.                $email_headers  = "From: {$siteclass->input->post_vars['email_address']} r\n";
  23.                $email_headers .= "Reply-To: {$siteclass->input->post_vars['email_address']} r\n";
  24.                                $email_headers .= 'Content-ty: text/html; \n';
  25.  
  26.                if (mail($siteclass->info->config['email_out'], " ({$siteclass->info->config['site_name']}) - Wiadomość od Użytkownika serwisu", $message_body, $email_headers) == true) {
  27.                    $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);
  28.                } else {
  29.                    $siteclass->templ->error("Wystąpił nieznany problem podczas wysyłania emaila.");
  30.                }
  31.            }
  32.            break;
  33. ?>


Z góry thx
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 02:04