Re: [Dialog] Please help with script
- From: Marcus Mönnig <usenet-apr05@xxxxxxxxxx>
- Date: Sun, 4 Sep 2005 11:06:04 +0200
*Jarrod Cifer*, 4 Sep. 05, 10:01:
> Nice! Do you mind if I put this in the script library?
If you do, please use this slightly modified version which fixes a problem
with emails without a subject header, works with "Re: ..." is a bit more
optimized.
program OnBeforeSavingMessage;
const NameofList = '['+'Type the Name of the List Here'+']';
procedure OnBeforeSavingMessage(var Message: TStringlist;
Servername: string;
IsEmail: boolean);
var
i,p: integer;
Soggetto: string;
begin
if IsEmail then begin
for i:=0 to message.count-1 do begin
if copy (message[i], 1, 9)='Subject: ' then begin
p := pos (NameofList, message[i]);
if p > 0 then begin
Soggetto := message[i];
delete (Soggetto, p, Length(NameofList));
message[i]:=Soggetto;
end;
break;
end
else if message[i]='' then break;
end;
end;
end;
begin
end.
Marcus
--
No replies in private e-mail, please, unless explicitly requested!
Please log bug reports into Mantis: http://www.40tude.com/dialog/mantis/
Please share your scripts and tips: http://www.40tude.com/dialog/wiki/
.
- Follow-Ups:
- Re: [Dialog] Please help with script
- From: Jarrod Cifer
- Re: [Dialog] Please help with script
- From: Tarkus
- Re: [Dialog] Please help with script
- From: Ghost
- Re: [Dialog] Please help with script
- References:
- Re: [Dialog] Please help with script
- From: Ghost
- Re: [Dialog] Please help with script
- From: Jarrod Cifer
- Re: [Dialog] Please help with script
- Prev by Date: Re: Attn: Blinky....got here from your site
- Next by Date: Re: Attn: Blinky....got here from your site
- Previous by thread: Re: [Dialog] Please help with script
- Next by thread: Re: [Dialog] Please help with script
- Index(es):
Relevant Pages
|