Sharon Stiles wrote:

> I have different names set up in my main account so I can keep tabs
> on where things come from (eg admin@, maillist@ etc). I don't want
> to set up separate accounts. I change the address when I send the
> message. However when I receive a reply to one of these messages the
> address I use to reply automatically becomes the main account name.
> Is there any way I can make the message default to replying from the
> original address?

I use a QT something like:

%SetPattRegExp("(?i)[EMAIL PROTECTED]")%-
%_To_Addr=%RegExpMatch("%OToList, %OCCList")%-
%If:"%_To_Addr"<>"":{%From=""%From="Your Name Here <%_To_Addr>"}%-

which I QInclude in my reply templates.  This will look in the To and
CC fields of the message you're 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 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="%ABFromFirstName('DefaultFirstName') 
%ABFromLastName('DefaultFirstName') <%ABFromEmail>"%-
%-%-%From=""%From=%_To_Addr%-
%-}:%-
%-{%-%From=""%From=%_O_From}%-
#%-

This will ensure that the matched address exists somewhere in your
address book.  For this to work, of course, you must have all your
email aliases defined in your address book.  As written, it will grab
the first and last names from the matched address book entry and use
those in the From address.  To prevent that, replace the appropriate
line with:

%-{%-%_To_Addr="Your Name Here <%ABFromEmail>"%-

Still not perfect, I don't think you can limit it to a specific
address book group, but better than the first one.

-- 
George

Using TB! 2.03 Beta/51 on Windows XP Pro 5.1, Build 2600, Service Pack 1.


________________________________________________
Current version is 2.02.3 CE | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to