Thread View: news.software.readers
1 messages
1 total messages
Started by Keith
Tue, 04 May 2004 10:27
[Dialog] It killed my script
Author: Keith
Date: Tue, 04 May 2004 10:27
Date: Tue, 04 May 2004 10:27
70 lines
2779 bytes
2779 bytes
When I compile it it gets no error, but it no longer
works with the upgrade. I did delete the previously compiled
script and compile it again, but no luck getting it to work.
//(C)Marcus Mรถnnig & Ingo Pflanz
program OnBeforeSendingMessage;
function OnBeforeSendingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean):boolean;
var i,j:integer;
s:string;
originalemail:string;
newemaillocal:string;
newemaildomain:string;
emailuser:string;
expiredate:string;
lastdayofmonth:string;
begin
result:=true;
if isemail then exit;
//replace invalid with userpart of email ('user' in user@arcor.de)
emailuser:='kilowatt_radio';
originalemail:=emailuser+'@spam.de';
newemaillocal:=emailuser+'@';
newemaildomain:='myway.com-Remove';
case formatdatetime('mm',now) of
// '01', '03', '05', '07', '08', '10', '12': lastdayofmonth:='31';
'01' : lastdayofmonth:='31';
'03' : lastdayofmonth:='31';
'05' : lastdayofmonth:='31';
'07' : lastdayofmonth:='31';
'08' : lastdayofmonth:='31';
'10' : lastdayofmonth:='31';
'12' : lastdayofmonth:='31';
'02' : begin
if isleapyear(CurrentYear) then
lastdayofmonth:='29'
else
lastdayofmonth:='28';
end
else
lastdayofmonth:='30'
end;
expiredate:=formatdatetime('hhyyyyMMmmss',now)+lastdayofmonth;
for i:=0 to Message.count-1 do
begin
s:=message.strings[i];
if s='' then break; //only scan through headers
j:=pos(originalemail,s);
if j>0 then
begin
delete(s,j,length(originalemail));
insert(newemaillocal+newemaildomain+expiredate,s,j);
message.strings[i]:=s;
end;
end;
end;
begin
end.
--
Best Regards, Keith
http://kilowatt-radio.org NW Oregon Radio Page
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads