rich gregory wrote:
> The REPLY macro below:
> 1) Uses the message's TO: as the reply's FROM:
> NOTE: If there are other names on the TO: line the 1st name there will
> become your FROM address so watch that! (I monitor this by having this
> template also put the FROM address in the message's signature so you
> can see what it did as you edit!)
<snip>
> %From=""%From="%OTOADDR"%-
<more snip>
To minimize the chance of replying as someone else, I use something
like the following in my reply templates:
%SetPattRegExp("(?i)[EMAIL PROTECTED]")%-
%_To_Addr=%RegExpMatch("%OToList, %OCCList")%-
%If:"%_To_Addr"<>"":{%From=""%From="My Name Here <%_To_Addr>"}%-
This will look in the To and CC fields of the message I'm replying
to for an email address that matches the regular expression defined in
the regular expression pattern. If finds one, it will use that address
for the From address of the reply. Otherwise, it will use the
account's default address.
The success of this template is dependent on the quality of the regex.
You must be able to define a pattern that will match all the possible
addresses you want to reply from. If it matches a string you didn't
intend for it to, you could reply using a bogus address.
For some protection against that, you could use:
%SetPattRegExp("(?i)[EMAIL PROTECTED]")%-
%_To_Addr=%RegExpMatch("%OToList, %OCCList")%-
%If:"%_To_Addr"<>"":%-
#%-%_O_From=%From%-
%-%From=""%From=%_To_Addr%-
%-%If:"%ABFromEmail"<>"":%-
%-{%-%_To_Addr="Your Name Here <%ABFromEmail>"%-
%-%-%From=""%From=%_To_Addr%-
%-}:%-
%-{%-%From=""%From=%_O_From}%-
#%-
This will ensure that the matched address exists somewhere in your
address book before using it as the From address. For this to work, of
course, you must have all your email aliases defined in your address
book.
I don't think you can limit it to a specific address book group, but
it's still perhaps an improvement on the first macro.
--
George
Using The Bat! 2.10.03 on Windows XP Pro 5.1, Build 2600, Service Pack 1.
________________________________________________
Current version is 2.10.03 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html