Fetch emmail headers & selective deletion
[1/7] from: philb::upnaway::com at: 22-Aug-2003 20:59
Hi,
Dont know if this is of any use to anyone .... but I have created a view front end to
the code below.
It will also allow selection & deletion of Emails that have yet to be downloaded from
the your POP server.
http://www.upnaway.com/~philb/philip/headers.r
Usefull if someone sends you a very large email that you dont want to (or cant) download.
Any comments/suggestions are welcome ....
*** Warning ***
Obviously take care when deleting email from the server ... you cant get it back!
Also take care not to run more than 1 copy of the program at once ....
*** Warning ***
Cheers Phil
=== Original Message ===
Hi Rene,
Think you can do it.
Cant remeber where this code came from .... (RT I think)
--------------------------------------------------------------------
attempt: does [
pop: open pop://user:[password--mail--server--com]/
lv-msgs: pop/locals/msg-nums
foreach mesg-num lv-msgs [
print ["Message" mesg-num]
insert pop/sub-port rejoin [ "TOP " pick pop/locals/msg-nums pop/state/index + mesg-num
" 0" ]
net-utils/confirm pop/sub-port [ none "+OK" ]
headers: pop/handler/read-til-dot pop make string! 1024
lv-em: import-email headers
print lv-em/date
]
close pop
]
attempt
--------------------------------------------------------------------
Just need to add the deletion code.
Cheers Phil
=== Original Message ===
Hi Rene,
RSB> I try to write a "fetchmail"-clone. In the "library" I found some few-liners
RSB> for deleting mail on the
RSB> mail-server. But I want to delete mail older than 5 day and sometimes mail
RSB> with a specific "subject".
RSB> Hiw can this be solved?
I'm not a POP expert by any means, but I think you're going to have to
either use TOP or RETR to get the information you want, in order to
decide if you want to delete the message. In REBOL, you open the
mailbox, import each message, analyze it, and remove it if desired.
Using TOP might work as well. Maybe Graham, Phil, or another mail
expert can be more helpful.
-- Gregg
[2/7] from: philb:upnaway at: 22-Aug-2003 21:00
Oops ... make that
http://www.upnaway.com/~philb/philip/utils/headers.r
Phil
=== Original Message ===
Hi,
Dont know if this is of any use to anyone .... but I have created a view front end to
the code below.
It will also allow selection & deletion of Emails that have yet to be downloaded from
the your POP server.
http://www.upnaway.com/~philb/philip/headers.r
Usefull if someone sends you a very large email that you dont want to (or cant) download.
Any comments/suggestions are welcome ....
*** Warning ***
Obviously take care when deleting email from the server ... you cant get it back!
Also take care not to run more than 1 copy of the program at once ....
*** Warning ***
Cheers Phil
=== Original Message ===
Hi Rene,
Think you can do it.
Cant remeber where this code came from .... (RT I think)
--------------------------------------------------------------------
attempt: does [
pop: open pop://user:[password--mail--server--com]/
lv-msgs: pop/locals/msg-nums
foreach mesg-num lv-msgs [
print ["Message" mesg-num]
insert pop/sub-port rejoin [ "TOP " pick pop/locals/msg-nums pop/state/index + mesg-num
" 0" ]
net-utils/confirm pop/sub-port [ none "+OK" ]
headers: pop/handler/read-til-dot pop make string! 1024
lv-em: import-email headers
print lv-em/date
]
close pop
]
attempt
--------------------------------------------------------------------
Just need to add the deletion code.
Cheers Phil
=== Original Message ===
Hi Rene,
RSB> I try to write a "fetchmail"-clone. In the "library" I found some few-liners
RSB> for deleting mail on the
RSB> mail-server. But I want to delete mail older than 5 day and sometimes mail
RSB> with a specific "subject".
RSB> Hiw can this be solved?
I'm not a POP expert by any means, but I think you're going to have to
either use TOP or RETR to get the information you want, in order to
decide if you want to delete the message. In REBOL, you open the
mailbox, import each message, analyze it, and remove it if desired.
Using TOP might work as well. Maybe Graham, Phil, or another mail
expert can be more helpful.
-- Gregg
[3/7] from: greggirwin:mindspring at: 22-Aug-2003 8:38
Hi Phil,
puc> Dont know if this is of any use to anyone .... but I have created
puc> a view front end to the code below. It will also allow selection
puc> & deletion of Emails that have yet to be downloaded from the your
puc> POP server.
That's excellent! Thanks Phil!
-- Gregg
[4/7] from: petr:krenzelok:trz:cz at: 22-Aug-2003 16:56
[philb--upnaway--com] wrote:
>Oops ... make that
>
>http://www.upnaway.com/~philb/philip/utils/headers.r
>
very cool ... could there be a timeout for refresh, so the list is
refreshed periodically at a given period? :-)
-pekr-
[5/7] from: philb:upnaway at: 22-Aug-2003 23:15
Hi Petr,
Nice idea .... should be simple to do ..... will update the program tommorow.
Cheers Phil
=== Original Message ===
[philb--upnaway--com] wrote:
>Oops ... make that
>
>http://www.upnaway.com/~philb/philip/utils/headers.r
>
very cool ... could there be a timeout for refresh, so the list is
refreshed periodically at a given period? :-)
-pekr-
[6/7] from: philb:upnaway at: 23-Aug-2003 20:13
Hi Petr,
You can specify a refresh period (as well as use the refresh button) .... so the list
automatically updates itself.
version (1.0.1)
Cheers Phil
=== Original Message ===
[philb--upnaway--com] wrote:
>Oops ... make that
>
>http://www.upnaway.com/~philb/philip/utils/headers.r
>
very cool ... could there be a timeout for refresh, so the list is
refreshed periodically at a given period? :-)
-pekr-
[7/7] from: faculty:cbi at: 23-Aug-2003 9:08
Phil:
Could you pass the code (as is -and any changes) in the text of an e-mail.
I can't down load it from the URL.
Thanks
Dr. J. J. "So far right, I can't see center" Harbaugh
[philb--upnaway--com] wrote: