Macro to selectively delete message from POP3 server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I check my e-mail from two locations. During the day I leave the messages on
the POP3 server from Work, during the night I download them and remove them
from the POP3 server from Home.

Sometimes I would like to selectively and permanently delete a message from
the POP3 server (e.g. spam) while I'm at work. I would like to keep things
as simple as possible and not change my folder management habbits. Hence I
would like to assign a macro to a toolbar button that would allow me to
permanently delete the message currently selected in my Inbox from the POP3
server.

I am familiar with VBA and customization etc. However I have no idea how to
communicate or manipulate messages on the POP3 server.

Could anyone give me a few pointers how I could accomplish this?
 
From Outlook, you can go to Tools - emails accounts - view or change and
select your account. Now, goto more settings - Advanced - Leave a copy
of messages on the server (this should be selected), and then Remove from
server when deleted from deleted items.

Now, if you don't want to do this all the time, but only on some mailitems
then create vb code to mimic that behaviour when you want to select a
mail from the server !

Papastefanos Serafeim
 
Thanks for your reply,

The only issue with this approach is that I usually delete all items even
the one I intend to read at home. This approach would require me to pay too
much attention to what is really junk and what I would like to read later-on.
I also have a compulsive habbit to empty the "Deleted Items" folder. I can
see myself deleting important messages by mistake. Ideally, I would like to
leave the message permanently on server from work.

It is the VBA code to mimic the "delete selected message from server" part
that I don't know where to start. This code would allow me to permanently
delete the message on the POP3 server, directly from my Inbox. Any other
ideas?

Thanks for you suggestions,
 
Well that's a tough one, I don't know how you can mimic
that behaviour programatically (or even if you can do it)....

But, there's another way. A very difficult one ...
You can do what the POP3 client does: Try this for
example:
Commandline> telnet popserver.myprovider.com 110
telnet> user myname
telnet> pass mypassword
telnet> list
telnet> dele 0
telnet> quit

Be careful, the previous POP3 transaction will delete from
the server the mail number 0. If you want to see which is
which then you can use the top command, like this
top mailnumber linestosee, eg top 0 10 will print the
first 10 lines of message 0...

So, when you press the delete item in your toolbar you
can open a connection to your pop3 server and issue the
dele command with the CORRECT argument. The mapping
between messages in your inbox and messages in the pop3
server seems very difficult to me, but NOT impossible. I
am positive that Outlook does something like this when
you select the option i wrote about in my previous post and
delete a mail, so it keep a mapping between the mails in
your inbox and the mails in the pop3 server. I don't know
where that mapping is kept and if you can access to it.

I can't think of anything better, i hope i helped,
Papastefanos Serafeim
 
Back
Top