Article View: news.software.readers
Article #147569[Dialog] It killed my script
From: 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
Technical Details
Message-ID:
<wvwg04jxebqw.dlg@spam-kilowatt-radio.org>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.ash.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.glorb.com!newsfeed.berkeley.edu!ucberkeley!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <wvwg04jxebqw.dlg@spam-kilowatt-radio.org> Subject: [Dialog] It killed my script Date: Tue, 4 May 2004 03:27:52 -0700 From: Keith <kilo_watt_radio@spam.de> 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.ash.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.glorb.com!newsfeed.berkeley.edu!ucberkeley!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: news.software.readers Organization: http://kilowatt-radio.org/ NW OR Radio Page User-Agent: 40tude_Dialog/2.0.11.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Copyright: Copyright 2004 X-No-Archive: Yes X-Complaints-To: abuse@supernews.com Lines: 70