![]() |
![]() ![]() |
![]() |
--luktoja-- |
![]()
Post
#1
|
Goście ![]() |
Witam!
W swoim serwisie mam prosty skrypt do wysyłania newslettera. Testowałem sobie tą opcję i prawie wszystko jest ok, po za 1 rzeczą. Chodzi o to, że po odebraniu maila w informacjach o e-mailu pokazuje się coś takiego: nouid_6776 [nouid_6776@adres_hosta_mojej_firmy_hostingowej]; w imieniu newsletter@moja_strona.pl Co muszę zmienić w poniższym kodzie, aby było tak: newsletter@moja_strona.pl PS Mam jeszcze takie drugie pytanko. Newsletter lepiej wysyłać w postaci TXT czy HTML? <? session_start(); include('../db_connect.php'); include('../ustawienia.php'); if($_SESSION['logadm'] == 'ok') { if($_SESSION['dostep'] == 3) { $tytul = $_POST['tytul']; $tresc = $_POST['tresc']; $tresc = str_replace("ś", "¶", $tresc); $tresc = str_replace("ś", "±", $tresc); $tresc = str_replace("ź", "Ľ", $tresc); $tytul = str_replace("ś", "¶", $tytul); $tytul = str_replace("ś", "±", $tytul); $tytul = str_replace("ź", "Ľ", $tytul); $i = 0; if($_POST['dk'] == 1) { $query = 'SELECT * FROM newsletter'; } else if($_POST['dk'] == 2) { $query = 'SELECT * FROM newsletter WHERE stan="2"'; } else if($_POST['dk'] == 3) { $query = 'SELECT * FROM newsletter WHERE stan="1"'; } $result = mysql_query($query); while($row = mysql_fetch_array($result)) { //--- $email = $row['email']; if($_POST['format'] == "1") { //---------- $header = "MIME-Version: 1.0\r\nFrom: $u_email <$u_email>"; @mail($email, "$tytul", "$tresc", "$header"); //---------- } else if($_POST['format'] == "2") { //---------- $header = "MIME-Version: 1.0\r\nContent-type: text/html; charset=".$l_charset."\r\nFrom: $u_email <$u_email>"; @mail($email, "$tytul", "$tresc", "$header"); //---------- } $i++; //--- } header('Location: stan.php?stan=mail&send='.$i.''); } } ?> |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 31.07.2025 - 09:53 |