First Last Prev Next    No search results available
Details
: %from% and %to% - Improvements + Stability + better List ...
Bug#: 25902
: smarttemplate4
: General
Status: ASSIGNED
Resolution:
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Axel Grude <axel.grude@gmail.com>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
0.9.6.1 prerelease 54 (334.96 KB, application/x-xpinstall)
2015-01-27 01:53, Axel Grude
no flags Details
test file (2.70 KB, text/html)
2015-02-03 01:35, Axel Grude
no flags Details
0.9.6.1 prerelease 63 (334.15 KB, application/x-xpinstall)
2015-02-03 01:46, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2014-11-27 01:04
If %to% is used in its plain form (not with an argument, like %to(name)% is
throws an error:

Warning: replaceReservedWords(dmy, to, undefined) failed - unknown token?
format is undefined
Source file: chrome://smarttemplate4/content/smartTemplate-overlay.js
Line: 447
Source code:
isName   chrome://smarttemplate4/content/smartTemplate-overlay.js:447:29
SmartTemplate4.mimeDecoder.split@chrome://smarttemplate4/content/smartTemplate-overlay.js:512:14
replaceReservedWords@chrome://smarttemplate4/content/smartTemplate-overlay.js:1347:15
SmartTemplate4.regularize@chrome://smarttemplate4/content/smartTemplate-overlay.js:1477:1
getProcessedText@chrome://smarttemplate4/content/smartTemplate-compose.js:744:17
getQuoteHeader@chrome://smarttemplate4/content/smartTemplate-compose.js:757:10
insertTemplate@chrome://smarttemplate4/content/smartTemplate-compose.js:911:19
SmartTemplate4.notifyComposeBodyReady@chrome://smarttemplate4/content/smartTemplate-main.js:358:5
SmartTemplate4.initListener/<@chrome://smarttemplate4/content/smartTemplate-main.js:272:5
Stationery.fireEvent@resource://stationery/content/stationery.jsm:301:3
Stationery_.ApplyTemplate@chrome://stationery/content/stationery-composer.js:175:5
Stationery.onComposeBodyReady@resource://stationery/content/composer_utils.jsm:349:5
stateListener.NotifyComposeBodyReady@chrome://stationery/content/stationery-composer.js:452:3
------- Comment #1 From Axel Grude 2015-01-27 01:53:00 -------
Created an attachment (id=8001) [details]
0.9.6.1 prerelease 54

%to% will now default to 

   name <email>

In this version, I have completely re-written the address replacement routine
in order to make the formatting of %to()% %from()% %cc()% etc. more easy and
configurable.

you can now put together the different parts in your order of choice, simply
concatenating the different needed parts.

For example:

%to(lastname,firstname,mail,linked)%
%from(name,bracketMail(round))%
%from(firstname,lastname,bracketMail(square))%

bracketMail is a new "subfunction" expression that "wraps" the mail part as
follows:

bracketMail(square)%      [email]  - square brackets
bracketMail(round)%       (email)   - round brackets
bracketMail(angle)%       <email>   - angled brackets
bracketMail(D1;D2)%       D1emailD2 - D1 and D2 represent wrapping characters

.. when using the wrapping delimiter syntax, you can use any character apart
from the special characters ,;()[]
the wrapping characters are separated by ;
empty characters are allowed (;)

bracketMail(<;>)%    <email>
bracketMail(";")%    "email"
bracketMail(- ;)%     - email

default when using %to% / %from% / %cc% etc (without any parameters) is
(name,bracketMail(angle))
------- Comment #2 From Axel Grude 2015-01-28 14:42:43 -------
ERRATA

the expression bracketMail() should NOT have a % after it!


bracketMail(square)      [email]  - square brackets
bracketMail(round)       (email)   - round brackets
bracketMail(angle)       <email>   - angled brackets
bracketMail(D1;D2)       D1emailD2 - D1 and D2 represent wrapping characters

.. when using the wrapping delimiter syntax, you can use any character apart
from the special characters ,;()[]
the wrapping characters are separated by ;
empty characters are allowed (;)

bracketMail(';')    'email'
bracketMail(";")    "email"
bracketMail(- ;)     - email
------- Comment #3 From Axel Grude 2015-02-03 01:35:50 -------
Created an attachment (id=8007) [details]
test file

Here is a html file with lots of test cases. Easiest use with Stationery and
just select it as template from the "Reply-To" dropdown.
------- Comment #4 From Axel Grude 2015-02-03 01:46:49 -------
Created an attachment (id=8008) [details]
0.9.6.1 prerelease 63

Fixing most bugs with %to% %from% and %identity%

First Last Prev Next    No search results available