Article View: news.software.readers
Article #145755Re: Custom header script
From: Hans Euler
Date: Sun, 04 Apr 2004 18:53
Date: Sun, 04 Apr 2004 18:53
56 lines
2568 bytes
2568 bytes
OB1 <OB1@pandora.beLGIUM> wrote in news:csrs7wmzuk31.2xpx4igdao38$.dlg@40tude.net: > For all those interested, i have made (well sort of) a script to > insert any custom header in your message. > I use it to insert a 'Distribution:' header into messages to some > groups on my isp's server that require it. > > To be honest: i just adapted the 'remove any header' script by Andreas > Loch i found in Wiki, to remove the first two characters from any > header, thereby making it possible to add your header by simply > creating a custom X-header in Dialog, and removing the 'X-' with the > script on sending. > > <code> > program OnBeforeSendingMessage; > // This script removes the 'X-' from an X-header, converting it into a > custom normal header > // Create the X-header in Dialogs Settings - > Server/Identities/Signatures... menu > const > // set the X-header you want to convert > ConvertHeader='X-Distribution'; > > procedure ConvertXHeader(Message:TStringlist); > var i:integer; > s:string; > begin > s:=Message.text; > while (Message.Strings[i]<>'') and > (pos(ConvertHeader,Message.Strings[i])=0) do > begin > i:=i+1; > if pos(ConvertHeader,Message.Strings[i])<>0 then > begin > delete(s,pos(ConvertHeader,s),2); > end; > end; > message.text:=s; > end; > > function OnBeforeSendingMessage(var Message: TStringlist; Servername: > string; IsEmail: boolean):boolean; > begin > if IsEmail then exit; > ConvertXHeader(Message); > result:=true; > end; > > begin > end. > > </code> > I'll try it.
Technical Details
Message-ID:
<Xns94C1799AD838Bxyyx@216.168.3.44>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!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nnx.oleane.net!oleane!freenix!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<csrs7wmzuk31.2xpx4igdao38$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <Xns94C1799AD838Bxyyx@216.168.3.44> Subject: Re: Custom header script Date: Sun, 04 Apr 2004 18:53:56 -0000 From: Hans Euler <hansnospam@hotmail.com> References: <csrs7wmzuk31.2xpx4igdao38$.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.ash.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nnx.oleane.net!oleane!freenix!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: news.software.readers Organization: MyCompany User-Agent: Xnews/5.04.25 X-Complaints-To: abuse@supernews.com Lines: 56