Re: Using Notes for User Authentication

Ralph Seichter <[email protected]>
Newsgroups gmane.linux.suse.domino
Message-ID <OF13C9D126.858A1605-ONC1256D67.00594A4C-C1256D67.005985D6@seichter.de>
"Thomas Schweikle" <[email protected]> wrote:

> PS: If you are using Notes for internet mail, it might be a good
> idea, to make it aware of "Re, AW, Antwort, ..." in the Subject of
> your mail...
>
> Here is what would do it for the standart mail template:
> "In Subject (Field)" - "Default Value":
> ReplyPrefixINI := @Environment("MailStReplyPrefix");
> ReplyPrefix := @If(ReplyPrefixINI = ""; "Antwort"; ReplyPrefixINI);
> Subj := @If(Subject = ""; Topic; Subject);
> Repl := @Trim(@Left(Subj; ":"));
> Pref := @If(Repl = ""; ReplyPrefix; Repl);
> @If(@UpperCase(Repl) = @UpperCase(Pref); Subj; Pref + ": " + Subj)
>
> Now just put what you want to be your prefered prefix into your
> notes.ini:
>
> $MailStReplyPrefix="Re"
>
> and you are off. No more annoying "Antwort: Re: Antwort: AW: RE:" in
> front of your subject lines!

If you're using R6, you can use this instead:

-----8<----------8<----------8<----------8<-----

subj     := @Trim(@If(Subject = ""; Topic; Subject));
preflist := @Unique(@Trim(@Explode(@LowerCase("Re," + 
@Environment("ReplyPrefixList")); ",")));

@For(more := @True; more; "";
  pref := @Word(subj; ":"; 1);
  @If(
    @IsMember(@LowerCase(pref); preflist);
    subj := @Trim(@RightBack(subj; @Length(pref) + 1));
    more := @False
  )
);

"Re: " + subj

-----8<----------8<----------8<----------8<-----

As you can see, I'm using the new @For loop feature to fix multiple
subject prefixes. To those not familiar with Lotus Formula language:
it is an ancient language, and loops have only been introduced with
Release 6. In clear nights, you can sometimes still hear grown
programmers break down and cry for joy! And if you think this code
looks weird: believe me, you ain't seen nothing yet! :-)

I don't know if the code will still look nice after line wrapping,
but anyway: copy it to the form "Reply", field "Subject", default
formula. By adding a line like

  $ReplyPrefixList=Answer,Antwort,AW,Reply

in your notes.ini, you can configure additional prefixes. Note that
"Re" is automatically defined by this code, but it does not hurt to
specifiy it.

> I'll keep hoping, IBM/Lotus making this short script standart in one
> of the next releases of Notes R5- and Notes 6- Clients.

I've been waiting for this kind of feature for a looong time now,
but I always had to modifiy the design myself. :-)

-- 
Mit freundlichen Grüßen / Yours sincerely
Dipl. Inform. Ralph Seichter

HORUS-IT
Ahornweg 10
D-57635 Oberirsen
Tel +49 2686 987880
Fax +49 2686 987889
http://horus-it.de/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.