Article View: news.software.readers
Article #172694Re: [Dialog] Please help with script
From: Ghost
Date: Sat, 03 Sep 2005 12:31
Date: Sat, 03 Sep 2005 12:31
43 lines
2969 bytes
2969 bytes
David Percival ha scritto:
> I get mail from a private server and the subjects all start with "[name
> of mailing list] rest of subject".
>
> Is there any way to write a script to remove just the "[name of mailing
> list]" part from the beginning of all the subjects in incoming mail?
Hi!
Something like this should fit (remember to edit the NameofList constant!):
program OnBeforeSavingMessage;
const
NameofList = '['+'Type the Name of the List Here'+']';
procedure OnBeforeSavingMessage(var Message: TStringlist;
Servername: string;
IsEmail: boolean);
var
i: integer;
p: Longint;
l: Longint;
Soggetto: string;
begin
if IsEmail then begin
i := 0;
while copy (message[i], 1, 9) <> 'Subject: ' do i := i + 1;
p := pos (NameofList, message[i]);
if p > 0 then begin
l := Length (message[i]);
Soggetto := copy (message[i],1,l);
delete (Soggetto, 10, Length(NameofList));
message.delete (i);
message.insert (i, Soggetto);
end; //end if p
end; //end if IsEmail
end;
begin
end.
--
Bye, Ghost of Lem Novantotto
Informazioni su it.*: http://www.news.nic.it
Archivio news: http://groups.google.it/advanced_search?hl=it
Linee guida della netiquette: http://www.faqs.org/rfcs/rfc1855.html
Technical Details
Message-ID:
<de303fad33a37574afc343cb322610f4%ghost@Lem98.here>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!131.211.141.196.MISMATCH!humbolt.nl.linux.org!news.nl.linux.org!news.newsland.it!x-privat.org!not-for-mailReferences:
<70z8yhn3xtl5$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <de303fad33a37574afc343cb322610f4%ghost@Lem98.here>
Subject: Re: [Dialog] Please help with script
Date: Sat, 3 Sep 2005 14:31:44 +0200
From: Ghost <Lem98@Hotmail.com>
References: <70z8yhn3xtl5$.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!213.218.66.70.MISMATCH!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!131.211.141.196.MISMATCH!humbolt.nl.linux.org!news.nl.linux.org!news.newsland.it!x-privat.org!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.1 Hamster/2.0.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Reply-To: Lem98@people.it
X-Face: '*{O=FR{|; Ot1.X_@;
4{`a1]Or*9c9}*@9`.O#:ZJt!ou@,?9Y@oFg)l$:T8UGtiTUo\[D~|`e8w!VqLVb5e2SUNAyM+Rqr{oI8GjuRdyzk2US,(hLDWI-T%b7daZ?S"H"_pNqS;
vNn@`~kpl46q92wYog~vrV3G(ZA.@UEI!r:u<If;
oUw]-rW|qZ!l6>>TEFfWn}y''DU-(9m\^8HDf5#eK?G~gSPt%Bff; 57-vw;
z%qCc=}{{xiLm2m:OwdG-RTO}nL_]m6ZBk<~iH+bSd&Z+y{?m]@:H6K[sb<s0KiGa
NNTP-Posting-Host: $$_ewgkl_uscym.x-privat.org
Organization: X-Privat NNTP Server - http://www.x-privat.org
Lines: 43
X-Authenticated-User: $$pt9kqlq__085nc1qk
X-Complaints-To: abuse@x-privat.org