Article View: news.software.readers
Article #145735Custom header script
From: OB1
Date: Sun, 04 Apr 2004 10:52
Date: Sun, 04 Apr 2004 10:52
52 lines
2644 bytes
2644 bytes
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>
--
OB1
Technical Details
Message-ID:
<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.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!news-out.cwix.com!newsfeed.cwix.com!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <csrs7wmzuk31.2xpx4igdao38$.dlg@40tude.net>
Subject: Custom header script
Date: Sun, 04 Apr 2004 10:52:58 GMT
From: OB1 <OB1@pandora.beLGIUM>
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.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!news-out.cwix.com!newsfeed.cwix.com!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.10.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Reply-To: OB1@pandora.beLGIUM
X-Face: 1wWh\l*{><LeE9{2BT6!6<#[7ub\1qHciF(x%Lv\{eJ`!JX]@UB{''Q%7Kc#RH3~M?USMs& sN;
u#neTF<U7uUo5\<c%mdO*~Wtg"PYkenla7I`V}jDW}J.IIS([8#[19B_08wtC.+<w@O?VYCI
Lines: 52
NNTP-Posting-Host: 213.224.89.237
X-Complaints-To: abuse@telenet.be
X-Trace: hestia.telenet-ops.be 1081075978 213.224.89.237 (Sun,
NNTP-Posting-Date: Sun, 04 Apr 2004 12:52:58 CEST
Organization: Telenet Internet