Re: Alternative display of recipient in to header (was: Re: Macro Help needed - addressing recipient according to gender set in AB)

2004-07-23 Thread Roelof Otten
Hallo Roelof,

On Fri, 23 Jul 2004 19:14:02 +0200GMT (23-7-2004, 19:14 +0200, where I
live), you wrote:

RO> As I said, this will only work for messages with one recipient, but
RO> since it deletes the old to-header that means that your template
RO> refuses to accept multiple recipients in your to-header (except when
RO> the first recipient isn't in your AB), so multiple recipients should
RO> be included in either the cc- or bcc-fields.

Of course you could adapt Robin Anson's QT as published at:
http://www.silverstones.com/thebat/Library.html#greet+all+recipients
somewhat, so it handles all recipients for you.

-- 
Groetjes, Roelof

Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies 
or rabbits.



Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Alternative display of recipient in to header (was: Re: Macro Help needed - addressing recipient according to gender set in AB)

2004-07-23 Thread Roelof Otten
Hallo Christopher,

On Fri, 23 Jul 2004 10:21:20 -0700GMT (23-7-2004, 19:21 +0200, where I
live), you wrote:

>> This is what went wrong:

CB> This works perfectly. And I really appreciate you taking the
CB> time to explain what was wrong.

That's just because next time I'll expect you to do the bug fixing
yourself. ;-)

-- 
Groetjes, Roelof

Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies 
or rabbits.



Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Alternative display of recipient in to header (was: Re: Macro Help needed - addressing recipient according to gender set in AB)

2004-07-23 Thread Roelof Otten
Hallo Christopher,

On Fri, 23 Jul 2004 08:57:51 -0700GMT (23-7-2004, 17:57 +0200, where I
live), you wrote:

>> Just insert the macro as it is here, with all
>> spaces and on as many lines as this example. It
>> should work though I didn't test it.

CB> I'm having a bit of trouble with the macro you offered. 

Yeah, notice the "should work" an "didn't test"

Try this one, it works I tested it. Still works for one recipient
only:

%If:$%ABToEmail$=$$:$$:$%-
%_To='"%-
%If:_%ABToNamePrefix_<>__:_%ABToNamePrefix _:__%-
%If:_%ABToFirstName_<>__:_%ABToFirstName _:__%-
%If:_%ABToMiddleName_<>__:_%ABToMiddleName _:__%-
%If:_%ABToLastName_<>__:_%ABToLastName_:__%-
%If:_%ABToNameSuffix_<>__:_ %ABToNameSuffix_:__%-
" <%ABToEmail>'%-
%To=""%To="%_To"$%-

This is what went wrong:

CB> %To=""%-

So here I'm emptying the to-header, since I 'd like to insert
something new and that's the biggest mistake, after all I try to get
the address info from the now empty to-header, so all my fields are
turning up empty.

CB> %If:_%ABToFirstName_<>__"_%ABToFirstName _:__%-
^
And that quote mark should've been a colon
Furthermore there's this minor point that I called the suffix
%ABToSuffix instead of %ABToNameSuffix (and likewise for the prefix)

As I said, this will only work for messages with one recipient, but
since it deletes the old to-header that means that your template
refuses to accept multiple recipients in your to-header (except when
the first recipient isn't in your AB), so multiple recipients should
be included in either the cc- or bcc-fields.
Of course you could use an additional if-statement that tests for
multiple addresses.

-- 
Groetjes, Roelof

Disclaimer: Any opinion stated in this message is not necessarily shared by my budgies 
or rabbits.



Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Alternative display of recipient in to header (was: Re: Macro Help needed - addressing recipient according to gender set in AB)

2004-07-23 Thread Christopher Brown
Hi Roelof,

> Just insert the macro as it is here, with all
> spaces and on as many lines as this example. It
> should work though I didn't test it.

I'm having a bit of trouble with the macro you offered. 

I get this exactly in the To: field:

""_ _:__" <>

And curiously, the Address book Handle, which I use in the greeting, becomes an 
underscore as well:

Hi __,

Here is the template in its entirety:

%ACCOUNT="ASU"%-
%If:$%ABToEmail$=$$:$$:$%-
%To=""%-
%To='"%-
%If:_%ABToPrefix_<>__:_%ABToPrefix _:__%-
%If:_%ABToFirstName_<>__"_%ABToFirstName _:__%-
%If:_%ABToMiddleName_<>__:_%ABToMiddleName _:__%-
%If:_%ABToLastName_<>__:_%ABToLastName_:__%-
%If:_%ABToSuffix_<>__:_ %ABToSuffix_:__%-
" <%ABToEmail>'$%-

Hi %ABToHandle="%ToFName",

%Cursor

-- 
 %FromFName %FromLName, Ph.D.
 %ORGANISATION
 mailto:%FromAddr

-- 
Chris
Using The Bat! v2.12.00 on Windows 2000 5.0 Build  2195
Service Pack 4

Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html