Comments (13)
sorry, don't know what it is but it seems like I have a "broken" message in my mailbox that is making trouble. Will get back on this soon.
from imap.
ok, seems like some messages are processed correctly (so it basically works) but my 4th message (processing mailbox->getMessages() ...) is making trouble on loading the headers.
messageNumber is set. But probably there is something wrong and the message can not be identified by imap_header()
just tried a short switch to use
imap_fetchheader() and imap_rfc822_arse_headers() but this is missing the following fields compared to imap_header():
- flags
- msgno
- size
- Maildate
- udate
- fetchfrom
- fetchsubject
from imap.
Can you try to write a failing test case with your fourth message?
—
On Sat, Nov 30, 2013 at 8:02 PM, kaiserlos [email protected]
wrote:
ok, seems like some messages are processed correctly (so it basically works) but my 4th message (processing mailbox->getMessages() ...) is making trouble on loading the headers.
messageNumber is set. But probably there is something wrong and the message can not be identified by imap_header()
just tried a short switch to use
imap_fetchheader() and imap_rfc822_arse_headers() but this is missing the following fields compared to imap_header():
- flags
- msgno
- size
- Maildate
- udate
- fetchfrom
* fetchsubject
Reply to this email directly or view it on GitHub:
https://github.com/ddeboer/imap/issues/26#issuecomment-29558617
from imap.
actually I am not sure how I could mock it because I can't exactly describe what is wrong. If you want I could send you the login to my testing mailbox, so you can also take a look on it.
from imap.
Does imap_fetchheader
instead of imap_header
work on the problematic message (except for the missing properties)?
Or you can paste the source of your message here, so I can have a look. We can then use (parts of) that source for a test case.
from imap.
Not sure because it breaks the script already at the first message because of the missing properties.
I got it working and pushed it to https://github.com/kaiserlos/imap
After fixing the first (imap_header) problem I got into another problem based on my first email in the list (that worked before my imap_header fix). On parsing the header to recipients there where cases where the host property wasn't set and also one array part which does not have mailbox, host and personal set). I fixed this with the second commit on my fork.
Haven't made a pull request for now because I am not sure if everything is still correct.
(both are spam messages which are coming to an catchall inbox [email protected])
My broken (fourth message)
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from ams002.hawkhost.com (ams002.hawkhost.com [159.253.129.252])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail02.dd24.net (Postfix) with ESMTPS id 1640970748
for <[email protected]>; Mon, 25 Nov 2013 22:27:10 +0000 (GMT)
Received: from g225183095.adsl.alicedsl.de ([92.225.183.95]:49797 helo=Alex-PC)
by ams002.hawkhost.com with esmtpa (Exim 4.80.1)
(envelope-from <[email protected]>)
id 1Vl4Zl-001xlN-50
for [email protected]; Mon, 25 Nov 2013 23:24:17 +0100
From: "[email protected]" <[email protected]>
Subject: =?iso-8859-1?Q?Bewerbung_als_Freiberufler_f=FCr_Webseitenoptimier?=
=?iso-8859-1?Q?ung_und_Google_Adwords_Werbung?=
To: [email protected]
Content-Type: text/plain; charset=iso-8859-1
Date: Mon, 25 Nov 2013 23:24:18 +0100
Message-Id: <20131125232418B42F40AE8C$84A108D483@ALEXPC>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - ams002.hawkhost.com
X-AntiAbuse: Original Domain - gebraucht.de
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - adwords3.com
X-Get-Message-Sender-Via: ams002.hawkhost.com: authenticated_id: [email protected]
X-Source:
X-Source-Args:
X-Source-Dir:
Sehr geehrte Damen und Herren,
ich bewerbe mich als freier Mitarbeiter im Bereich Webseitenoptimierung,
(Suchmaschinenoptimierung) und Google Adwords Werbung.
Seit Jahren betreue ich erfolgreich verschiedene Webseiten und Online-Shops.
Hier konnte ich die Zahl der Kunden und der Verkäufe deutlich verbessern.
2007 bis heute habe ich für verschiedene Online-Marketing-Agenturen Google-
Adwords-Kampagnen entwickelt und optimiert.
Insgesamt verfüge ich über sechs Jahre Erfahrung im Online-Marketing
(Suchmaschinenoptimierung und Google Adwords Werbung).
Auf Wunsch biete ich auch Webseitenerstellung und Optimierung und Online-
Shop-Lösungen.
Wenn Sie meine Mitarbeit wünschen, würde ich mich über eine kurze Nachricht
freuen. Gerne unterbreite ich Ihnen auch ein individuelles Angebot.
Mit freundlichen Grüssen
Lars Fiedler
Tel.: 0152/ 231 17 526
[email protected]
www.adwords-blog.com
The first message (which was working before my imap_header fix)
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from srv3017vle.sicoobcoopere.coop.br (srv3017vle.sicoobcoopere.coop.br [186.226.184.2])
by mail02.dd24.net (Postfix) with ESMTP id 5C97070CB7
for <[email protected]>; Fri, 22 Nov 2013 21:35:39 +0000 (GMT)
Received: from correio.sicoobcoopere.coop.br (localhost [127.0.0.1])
by srv3017vle.sicoobcoopere.coop.br (Postfix) with ESMTP id 44AB5582BF4;
Fri, 22 Nov 2013 17:34:33 -0200 (BRST)
Received: from 41.138.185.51
(SquirrelMail authenticated user direx)
by correio.sicoobcoopere.coop.br with HTTP;
Fri, 22 Nov 2013 17:34:33 -0200
Message-ID: <5c5ed237e2dd573cd2c41cddb78a4297.squirrel@correio.sicoobcoopere.coop.br>
Date: Fri, 22 Nov 2013 17:34:33 -0200
Subject:
From: "Mr. Kent B Miller" <[email protected]>
Reply-To: [email protected]
User-Agent: SquirrelMail/1.4.20
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
To: undisclosed-recipients:;
I am Mr. Kent B Miller assistant manager of Financial Brokers and Business,
we currently offer Xmas loan to individuals and company investors at 2%
interest rate.
Email:[email protected]
Fill out the details below:
Full name:
Country:
Address:
State:
Zip code:
Amount
needed:
Duration:
Tel:
Reason:
Contact us by reply and we give you more response.
Contact Online Manager
Mr. Kent B Miller
Mr. Adeyemi Sule
Online department manager
[email protected]
[email protected]
from imap.
I can verify this problem exists for me too. Applying @kaiserlos patch fixes it.
from imap.
Please merge this fix and update bring out a new version
from imap.
The pull request #29 fixes this issue
from imap.
Fix https://github.com/kaiserlos/imap/commit/83bc9813e646859a43dca8863bcd1fb09e5dacaa indeed seems to do the trick. What is the status of this patch? Do you plan to merge it? It's clearly broken the way it is now and even if it appears to work, it's probably fetching wrong emails all the time...
from imap.
Confirmed for me too. Can we merge so it is easy to get the fixed package with packagist?
from imap.
If you have
$result = $mailbox
->getMessages(new SearchExpression()) // get Messages work with UID
->current()
;
and then if you try to:
$result->getSubject()
you have poblems because the
$headers = \imap_header($this->stream, $this->messageNumber);
are working with the number of the message not the UID
from imap.
Now is fixed with #44 thanks @ddeboer
from imap.
Related Issues (20)
- New "References:" formatting in headers processed by Exchange?
- Variable in Search not working.
- getFilename() returns NULL for long attachment filenames
- How can I retrieve single mail HOT 1
- Is there a way to fetch only not replied messages? HOT 4
- Google imap no longer supports username and password authentication. HOT 1
- Oauth2 problem HOT 1
- Supplied resource is not a valid imap resource HOT 1
- Wrong post
- imap_sort(): Argument #3 ($reverse) HOT 1
- mb_convert_encoding(): Illegal character encoding specified HOT 4
- Backporting https://github.com/ddeboer/imap/pull/546 to PHP7.4 HOT 1
- Is there any way to add multiple 'oRcondition' in SearchExpression with From Address HOT 1
- Running into intermittent "Cannot reopen mailbox XYZ" HOT 2
- PHP 8.2 compatibility HOT 2
- Imap Codeigniter 4 HOT 2
- Can't retrieve headers from RFC822-HEADERS subpart HOT 2
- output abort message
- Move message to another account HOT 3
- Crash getting message sequence with error: Mailbox has more messages HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imap.