Hello Ottar,
Historians believe that Mon, 16 Apr 2001 at 19:59 GMT +0200 was when,
Ottar Grimstad [OG] typed the following:
OG> I have made a Group in my address book. When I write a message to
OG> the group, I want the message to start with a greeting that makes it
OG> clear that the message is sent to the whole group. I do not want
OG> this message to appear when I send individual mails to people that
OG> happens to be members of this group.
<snip>
OG> Is it possible to have conditional macros? If %TONAME is listname
OG> then write this, if not write this other? I cannot find anything on
OG> conditions and branching in the helpfile. Regular expressions are
OG> something powerful that I just do not master. Can these be used?
Yes, it is possible. Now your best bet to make this work is to create
a few quick templates (Options -> Quick Templates). First one will be
for your Group greeting. Just enter the greeting you'd want for
messages to the group. I'll assume you called the Quick Template
"Group". If you chose something different you'll need to replace it in
the regular expression below. The second Quick Template, put your
greeting for the individuals. I'll assume the QT name is "Indiv".
Now in your group template (or a quick template included into your
group template), use the following regexp on one line:
%SETPATTREGEXP="(?i)(?(?=.*?\<list\>.*?;;.*;;.*).*;;(.*);;.*|.*;;.*;;(.*))"%REGEXPBLINDMATCH="%TOLIST%CCLIST%BCCLIST;;%QINCLUDE=""GROUP"";;%QINCLUDE=""INDIV"""%SUBPATT="1"%SUBPATT="2"
This seems to work on my system. Now it works by looking for the word
"<list>" in the TO:, CC: and BCC: lines. This might not be ideal in
all situations. Let us know how it works. If it needs tweaking for
your situation, let us know as well.
--
Thanks for writing,
Januk Aggarwal
Using The Bat! 1.51 under Windows 98 4.10 Build 2222 A
I was the next door kid's imaginary friend.
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>
You are subscribed as : [email protected]