-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Experimental fixes #14
Conversation
1e0688d
to
cd7e989
Compare
@@ -381,7 +385,7 @@ public function setFlag($mailId, $flag, $value) | |||
* @throws DriverException | |||
*/ | |||
public function copyMail($mailId, $toMailbox) { | |||
if(!imap_mail_copy($this->resource, $mailId, $this->server . $this->encodeMailboxName($toMailbox), CP_UID)) { | |||
if(!imap_mail_copy($this->resource, $mailId, /*$this->server .*/ $this->encodeMailboxName($toMailbox), CP_UID)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be some way how to configure this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment in PR
…hitespaces, normalizes UTF-8 strings and trims headers content
… should be configurable)
…roper bullet proof adrlist parser; PHP one is not realible at all
…was totaly unpredictable and caused a lot of pain PROPOSAL: getHeader should return what was found just by case insensitive comparison; object properties can be magically mapped; maybe better to use ArrayAccess where you can use proper header names?
cd7e989
to
a169cdf
Compare
I was thinking about this, and I think the best solution is:
I think this should work without any problems, do you have other opinion?
This is problem I had not figured out yet, how to solve. I am planning to do little test for most common email providers and check, how does their IMAP server react to create/rename/delete mailbox and move/copy/delete mail from mailbox, with both prefixed and non-prefixed mailbox name. I know, that 4 years ago when I was writing this library, I did some testing for gmail and this worked, so I used it and let it be. But things maybe changed or you used different provider, so this needs to be tested. Since it is BC break, this should be only in 3.3.0 or even 4.0 (which is already in development, slow, but it is)
I completely agree this is not the best implementation. I wanted to provide easier access to parts of address, but did not think about it correctly (also somebody came with PR, which I merged without thinking, thats why there is some buggy code). I think The reason why it is in IMAP driver and not on higher level is because it uses some
That is part of refactoring in 4.X branch, which I will think about. Thanks for the link, I was looking some time ago for working library and did not find any. Maybe I can use that, or just write own client. It will be recommended driver, but I think I should not drop support for IMAP driver. Or should I? |
No this will not work. What i come with works. parse header -> fix utf8 -> utf8 NFC normalization -> toLower -> save as key to array This is only what should works. E.g.: Cc, CC and cc is the same header
This should be configurable. And default to be turned on. So no BC break. I've been using it with Kerio Connect. Or there can be also auto-detection using mail listing. But this can be slow in big mailboxes.
Cool!
|
This PR contains experimental fixes and idea proposals. Comments please.
This PR requires #13 to be merged first.