Skip to content
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

(Mail) Pop3: Remove Message #1

Closed
DerDu opened this issue Jan 15, 2014 · 6 comments
Closed

(Mail) Pop3: Remove Message #1

DerDu opened this issue Jan 15, 2014 · 6 comments

Comments

@DerDu
Copy link

DerDu commented Jan 15, 2014

If i try to remove a message, what number (uid) i have to provide?

If i do getEmails( 1, 1 ) it should return $Message #1 right?

  • So remove( 1 ) has to (at least) mark it as deleted

= won't work

  • So i switched to $Message['Id']: remove( '<some strange id here>' )

= won't work

Am I doing it wrong, or is something broken?

PS: There is no field $Message['Uid'] as in imap message

@Sherlonv
Copy link
Contributor

@DerDu, did you set the mailbox? There has to be an active mailbox in order for it to delete.
Example:
$remove = eden('mail')->
imap('imap.gmail.com', '[EMAIL-ADDRESS]', '[PASSWORD]', 993, true)->
setActiveMailbox('INBOX')
->remove('1');

@DerDu
Copy link
Author

DerDu commented Jan 17, 2014

@Sherlonv, yes - i switched to imap because it's working :-)

But my question is about Pop3, which i can't get to delete a message from (exact same) server...

@Sherlonv
Copy link
Contributor

How did you try Pop3 and on what domain?
I tried it using Gmail then I had to alter my settings to allow POP.

You also have to connect() first then remove(), and if you want the changes to reflect immediately you have to disconnect().

@DerDu
Copy link
Author

DerDu commented Jan 28, 2014

@Sherlonv Thats what i'am doing (just as the documentation-example does).. everything works as i expect.. except removing a message...

I realized another missing feature in imap.. :-( ...
remove() just sets the deleted flag to a message, but there is no expung function to remove it permanently .. so i end up with a stuffed mailbox... sad

DerDu added a commit to DerDu/Mail that referenced this issue Jan 28, 2014
You need to send "CLOSE" before "LOGOUT" to remove delete-flagged messages from active message box - or: provide (at least) a function to do so manually
Fix for issue Eden-PHP#1
@DerDu
Copy link
Author

DerDu commented Mar 21, 2018

🥇 closed != solved, there is an expunge method, but it's not working because of wrong usage within imap protocol (missing close command).. sry

@cblanquera
Copy link

Lets move this conversation to #53

cblanquera pushed a commit that referenced this issue Mar 23, 2018
by @DerDu . I couldn't accept the PR #2 because of conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants