Sugarfree Posted February 8, 2008 Author Report Share Posted February 8, 2008 'safe mode' problēma atrisinājās, biju jau sapriecājies, bet joprojām tā pati vecā dziesma... Vēstules nāk ar nepareizu encoding jeb tā teikt, encoding iekš message source vispār nepārādās. Nu vai kāds, lūdzu, nevar pateikt, kur man ir tā kļūda? <?php $EmailTo = "paraugs@paraugs.lv"; $Name = $_POST['Name']; $Email = $_POST['Email']; $Phone = $_POST['Phone']; $Message = $_POST['Message']; // The body text of your email $Body = ""; $Body .= "Vards: "; $Body .= $Name; $Body .= " "; $Body .= "e-pasts: "; $Body .= $Email; $Body .= " "; $Body .= "Talrunis: "; $Body .= $Phone; $Body .= " "; $Body .= "Teksts: "; $Body .= $Message; $Body .= " "; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; // command that calls the php mail() function mail($EmailTo, $Subject, $Body, "From: $Email", $headers); ?> Link to comment Share on other sites More sharing options...
xPtv45z Posted February 8, 2008 Report Share Posted February 8, 2008 http://lv.php.net/manual/en/ref.mail.php#75663 Papēti kādi tiek rakstīti headeri un kur tiek padots encodings. Link to comment Share on other sites More sharing options...
Sugarfree Posted February 8, 2008 Author Report Share Posted February 8, 2008 $headers .= 'To: '.$MailTo.' <'.$MailTo.'>'.$eol; $headers .= 'From: '.$SenderName.' <'.$SenderMail.'>'.$eol; $headers .= "Message-ID: <".$Momentn."@".$Servername.">".$eol; $headers .= 'Date: '.date("r").$eol; $headers .= 'Sender-IP: '.$_SERVER["REMOTE_ADDR"].$eol; $headers .= 'X-Mailser: iPublications Adv.PHP Mailer 1.6'.$eol; $headers .= 'MIME-Version: 1.0'.$eol; $bndp = md5(time()).rand(1000,9999); $headers .= "Content-Type: multipart/mixed; $eol boundary=\"".$bndp."\"".$eol.$eol; Man vajadzētu tātad to $Body vietā likt $header? Kaut kā tā? ;/ Link to comment Share on other sites More sharing options...
Recommended Posts