Jump to content
php.lv forumi

Labdien. Problēmas ar e-pastu sūtīšanu.


Svetux

Recommended Posts

Labdien.

 

Varbūt kāds ir saskāries ar e-pasta sūtīšanas problēmu one.lv? Mani interesē tieši one.lv teksts. Sūtu plainā, tā kā one html neatpazīst. Header smuki sūta ar garumzīmēm, toties pašā e-pasta tekstā nevaru dabūt iekšā garumzīnes. Sūtu "Utf-8" charsetā. Mēģināju arī citos. Uz citiem mailiem viss smuki aiziet arī html.

 

Paldies.

Link to comment
Share on other sites

Varbūt parādi kā tieši Tu izsauc to mail(), citādi grūti izdomāt, kas ir par vainu. ā un arī parādi Source tam mailam, kas atsūtās (ar nekorektajām garumzīmēm). Aptuveni source izskatās šādi:

Delivered-To: [email protected]
Received: by 15.14.13.12 with SMTP id 21431421421424213;
	Tue, 11 Dec 2007 07:33:00 -0800 (PST)
Received: by 12.13.14.15 with SMTP id 3719832749821647264;
	Tue, 11 Dec 2007 07:33:00 -0800 (PST)
Return-Path: <[email protected]>
Received: from pastnieks.pasts.pa (pastnieks.pasts.pa [44.33.22.11])
	by mx.kautkur.com with ESMTP id 381749836564398;
	Tue, 11 Dec 2007 07:33:00 -0800 (PST)
Received-SPF: pass (kautkur.lv: best guess record for domain of [email protected] designates 11.22.33.44 as permitted sender) client-ip=11.22.33.44;
Authentication-Results: mx.kautkur.lv; spf=pass (kautkur.lv: best guess record for domain of [email protected] designates 11.22.33.44 as permitted sender) [email protected]
Received: from [11.22.33.44] (helo=pastotaajs.citskas.net)
by pastnieks.pasts.pa esmtp (Exim 4.60 #1 (Debian))
id 84379827394621987
for <[email protected]>; Tue, 11 Dec 2007 15:32:58 +0000
Received: from pastotaajs.citskas.net (localhost [127.0.0.1])
by pastotaajs.citskas.net (Postfix) with ESMTP id 74397324623243253
for <[email protected]>; Tue, 11 Dec 2007 15:32:58 +0000 (GMT)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
To: [email protected]
From: [email protected]
Subject: Translation download request: 
Message-Id: <87520875237503257237872527038729372403742874827423>
Date: Tue, 11 Dec 2007 15:32:58 -0000
Reply-To: [email protected]
Sender: [email protected]
Errors-To: [email protected]
Precedence: bulk
X-Generated-By: CitMail

Pasta teksts. Pasta teksts. Pasta teksts.

Link to comment
Share on other sites

Kods ir sekojošs:

 

// Augstāk attiecīgi mainīgie nodefinēti un POST nočekots

 

$subject = $_POST['subject_text'];

$message_plain = $_POST['body_text'];

$message_plain = stripslashes($message_plain);

 

$from = $_POST['from_text'];

 

$headers = "MIME-Version: 1.0\r\n";

$headers .= "Content-type: text/plain; charset=utf-8\r\n";

$headers .= "From: ".$from."\r\n";

 

mail('[email protected]', Subscribers::encode($subject, "utf-8"), $message_plain, $headers);

 

 

Šis ir saīsinātais testa kods. Faili visi man ir UTF-8 kodējumā.

Kā one.lv var apskatīties Mail source?

Link to comment
Share on other sites

Man šķiet, ka ar kodēšanu nav tik vienkārši...

Teksim thunderbirds plaintext mailu UTF-8 kodējumā attēlo šitā (subject&body saturs - glāžšķūņrūķīši):

...
Subject: =?UTF-8?B?Z2zEgcW+xaHEt8WrxYZyxavEt8SrxaFp?=

...
Content-Type: text/plain; charset=UTF-8; format=flowed

Content-Transfer-Encoding: quoted-printable


gl=C4=81=C5=BE=C5=A1=C4=B7=C5=AB=C5=86r=C5=AB=C4=B7=C4=AB=C5=A1i

Link to comment
Share on other sites

×
×
  • Create New...