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: kautkam@kautkur.lv
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: <pavisamcits@citskas.net>
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 pavisamcits@citskas.net 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 pavisamcits@citskas.net designates 11.22.33.44 as permitted sender) smtp.mail=pavisamcits@citskas.net
Received: from [11.22.33.44] (helo=pastotaajs.citskas.net)
by pastnieks.pasts.pa esmtp (Exim 4.60 #1 (Debian))
id 84379827394621987
for <kautkam@kautkur.lv>; 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 <kautkam@kautkur.lv>; 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: katkam@kautkur.lv
From: citskas@citskas.net
Subject: Translation download request: 
Message-Id: <87520875237503257237872527038729372403742874827423>
Date: Tue, 11 Dec 2007 15:32:58 -0000
Reply-To: citskas@citskas.net
Sender: pavisamcits@citskas.net
Errors-To: citskas@citskas.net
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('kautkam@one.lv', 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...