Recommend this page to a friend! |
POP3 e-mail client | > | All threads | > | Return-path adress is missing when... | > | (Un) Subscribe thread alerts |
|
Jesper Christiansen - 2006-12-18 12:59:24
Hi,
Thanks a lot for a great script! I have a problem though. The return-path field is empty, and there is no email written after the sender name. So how do i get the reply email adress? My debug output is as follows: Connecting to mail.cyberart.dk ... S +OK mail1.unoeuro.com - Server ready C USER itafdelingen@cyberart.dk S +OK C PASS test S +OK Logged in. C RETR 2 S +OK 2236 octets S Return-Path: <jespah@gmail.com> S X-Original-To: itafdelingen@cyberart.dk S Delivered-To: itafdelingen@cyberart.dk S Received: from localhost (localhost.localdomain [127.0.0.1]) S by mail1.unoeuro.com (Postfix) with ESMTP id C81C12A89A5 S for <itafdelingen@cyberart.dk>; Mon, 18 Dec 2006 13:19:58 +0100 (CET) S Received: from mail1.unoeuro.com ([127.0.0.1]) S by localhost (mail1.unoeuro.com [127.0.0.1]) (amavisd-new, port 10024) S with ESMTP id SQrCFt4c6nGa for <itafdelingen@cyberart.dk>; S Mon, 18 Dec 2006 13:19:56 +0100 (CET) S Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) S by mail1.unoeuro.com (Postfix) with ESMTP id 3FD9B2A8428 S for <itafdelingen@cyberart.dk>; Mon, 18 Dec 2006 13:19:53 +0100 (CET) S Received: by nf-out-0910.google.com with SMTP id l24so1822417nfc S for <itafdelingen@cyberart.dk>; Mon, 18 Dec 2006 04:19:54 -0800 (PST) S DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; S s=beta; d=gmail.com; S h=received:message-id:date:from:to:subject:mime-version:content-type; S b=BZL2oeEm0uW2cHT1WS0EFhLRBLzLOZNyay6vjP0aNaPvjbFatMcfTkr1+iPUtaTzYwxpWVlifLasl8Zd174W6d19lLS9IlodjNiDt/jBlfliF/SxRG5y9d8UMnwyKS5SjB/5Agg+1xOAX/ONXArNIpe7+c6AnTYsoTk7FOR7fVA= S Received: by 10.49.92.18 with SMTP id u18mr4934360nfl.1166444393815; S Mon, 18 Dec 2006 04:19:53 -0800 (PST) S Received: by 10.49.10.15 with HTTP; Mon, 18 Dec 2006 04:19:53 -0800 (PST) S Message-ID: <ca5a2a300612180419q4e68e9few48a8cdce41d359df@mail.gmail.com> S Date: Mon, 18 Dec 2006 13:19:53 +0100 S From: "Jesper Christiansen" <jespah@gmail.com> S To: itafdelingen@cyberart.dk S Subject: test2 S MIME-Version: 1.0 S Content-Type: multipart/alternative; S boundary="----=_Part_11777_30139146.1166444393781" S S ------=_Part_11777_30139146.1166444393781 S Content-Type: text/plain; charset=ISO-8859-1; format=flowed S Content-Transfer-Encoding: 7bit S Content-Disposition: inline S S -- S Med venligste hilsener S Jesper Christiansen S S ------=_Part_11777_30139146.1166444393781 S Content-Type: text/html; charset=ISO-8859-1 S Content-Transfer-Encoding: 7bit S Content-Disposition: inline S S <br clear="all"><br>-- <br>Med venligste hilsener<br>Jesper Christiansen S S ------=_Part_11777_30139146.1166444393781-- S . C QUIT S +OK Logging out. Closing connection. and when I parse it using your mime parser, the return path disappears :( array(2) { ["Headers"]=> array(12) { ["return-path:"]=> string(18) "" ["x-original-to:"]=> string(24) "itafdelingen@cyberart.dk" ["delivered-to:"]=> string(24) "itafdelingen@cyberart.dk" ["received:"]=> array(6) { [0]=> string(177) "from localhost (localhost.localdomain [127.0.0.1]) by mail1.unoeuro.com (Postfix) with ESMTP id C81C12A89A5 for ; Mon, 18 Dec 2006 13:19:58 +0100 (CET)" [1]=> string(204) "from mail1.unoeuro.com ([127.0.0.1]) by localhost (mail1.unoeuro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SQrCFt4c6nGa for ; Mon, 18 Dec 2006 13:19:56 +0100 (CET)" [2]=> string(196) "from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mail1.unoeuro.com (Postfix) with ESMTP id 3FD9B2A8428 for ; Mon, 18 Dec 2006 13:19:53 +0100 (CET)" [3]=> string(131) "by nf-out-0910.google.com with SMTP id l24so1822417nfc for ; Mon, 18 Dec 2006 04:19:54 -0800 (PST)" [4]=> string(103) "by 10.49.92.18 with SMTP id u18mr4934360nfl.1166444393815; Mon, 18 Dec 2006 04:19:53 -0800 (PST)" [5]=> string(63) "by 10.49.10.15 with HTTP; Mon, 18 Dec 2006 04:19:53 -0800 (PST)" } ["domainkey-signature:"]=> string(314) "a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=BZL2oeEm0uW2cHT1WS0EFhLRBLzLOZNyay6vjP0aNaPvjbFatMcfTkr1+iPUtaTzYwxpWVlifLasl8Zd174W6d19lLS9IlodjNiDt/jBlfliF/SxRG5y9d8UMnwyKS5SjB/5Agg+1xOAX/ONXArNIpe7+c6AnTYsoTk7FOR7fVA=" ["message-id:"]=> string(61) "" ["date:"]=> string(31) "Mon, 18 Dec 2006 13:19:53 +0100" ["from:"]=> string(40) ""Jesper Christiansen" " ["to:"]=> string(24) "itafdelingen@cyberart.dk" ["subject:"]=> string(5) "test2" ["mime-version:"]=> string(3) "1.0" ["content-type:"]=> string(74) "multipart/alternative; boundary="----=_Part_11777_30139146.1166444393781"" } ["Parts"]=> array(2) { [0]=> array(5) { ["Headers"]=> array(3) { ["content-type:"]=> string(45) "text/plain; charset=ISO-8859-1; format=flowed" ["content-transfer-encoding:"]=> string(4) "7bit" ["content-disposition:"]=> string(6) "inline" } ["Parts"]=> array(0) { } ["Body"]=> string(52) "-- Med venligste hilsener Jesper Christiansen " ["BodyPart"]=> int(1) ["BodyLength"]=> int(52) } [1]=> array(5) { ["Headers"]=> array(3) { ["content-type:"]=> string(29) "text/html; charset=ISO-8859-1" ["content-transfer-encoding:"]=> string(4) "7bit" ["content-disposition:"]=> string(6) "inline" } ["Parts"]=> array(0) { } ["Body"]=> string(77) "-- Med venligste hilsenerJesper Christiansen " ["BodyPart"]=> int(2) ["BodyLength"]=> int(77) } } } What have I done wrong? Thanks in advance!
Manuel Lemos - 2006-12-18 13:35:57 - In reply to message 1 from Jesper Christiansen
The class returns all headers in lower case, so it returned as return-path: .
Anyway, that is not the header you should use to reply to the message. If the reply-to: header is missing, you should use the address in the to: header.
Jesper Christiansen - 2006-12-18 22:20:07 - In reply to message 2 from Manuel Lemos
The problem is, that the email address from which I sent the email where I posted the debug output from, is not shown anywhere in the parsed output. It's the jespah@gmail.com that I need.. But I cant seem to find it anywhere in the parsed version? :(
Manuel Lemos - 2006-12-19 01:49:35 - In reply to message 3 from Jesper Christiansen
It is in the from: header. The reason why you are not seeing it is because you used var_dump() to display the array in an HTML page, and since the address is between < > characters, the browser assumes it is a tag and does not display anything, but it is there.
|
info at phpclasses dot org
.