Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%identity% - add feature to load additional information from addressbook #35

Closed
RealRaven2000 opened this issue Jan 16, 2020 · 2 comments
Assignees

Comments

@RealRaven2000
Copy link
Owner

%identity% should be extended to retrieve addressbook info for additional detail, in the same manner as the other address variables (%to%, %from%, %cc% etc). This can be useful for adding address and contact information based on current identity at the bottom of the email. The entry should be resolved via the email address of the identity. To switch on this behavior, use the parameter "addressbook", followed by the desired addressbook fields, e.g.:

%identity(addressbook,name,workphone,work.department)%
@RealRaven2000
Copy link
Owner Author

Here is an (already pretty far advanced) test version. I also managed to factor in the beloved [[ optional stuff ]] syntax, which is mind-blowingly difficult seeing that [ and ] are also reserved characters in regular expressions.

Here is an example for a template with this syntax:

<p>Dear %to(name)%</p>
<p>%cursor%</p>
<p>Kind regards<br>
&nbsp;&nbsp; %identity(addressbook,firstname)% <br>
[[%identity(addressbook,work.title)%  <br>]]
[[%identity(addressbook,work.organization)% <br>]]
[[dep: %identity(addressbook,work.department)% <br>]]
[[phone: %identity(addressbook,workphone)%<br>]]
[[private: %identity(addressbook,homephone)%<br>]]
[[other: %identity(addressbook,other.custom1)%<br>]]

So in this example, I assume firstname can always be resolved from my matched AB entries. I also assume that an entry will definitely be found in the AB.

All other lines are "optional" and will be removed if no data is found in that part of the AB card. That means we can use this template by matching it with different contacts and only fill in a line like
phone: 01 -12343 478234 if there is actually any data in the workphone field.

smartTemplate-fx-2.8pre160.zip

@RealRaven2000
Copy link
Owner Author

Closing as complete with release 2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant