You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Set a default template to be automatically applied on a new/replied/forwarded email #200
My apologies for a 'me too' post - but, I'd also like to thank John for his work porting this and Emil before him - do you drink coffee; can I buy you one :)
So, yes, a default would save one more repetitive mouse click.
I am not sure how it could be implemented especially on a new email. The question is when the template should be applied.
If it would be applied directly on start of a new email a variable like [[TO=firstname]] is useless, as one didn't add the recipients yet. This is similar when forwarding an email. A reply would usually be fine with it.
If it would be applied when adding the first recipient one could already have written parts of the email and it might be an unwanted
8000
action to add the template at this point.
On the other way a script like CleanSubject would work fine with (1) also when forwarding.
How would you think it should work? Would you use it just for replies with (1) or do you see any other use cases for new and forwarded emails, that I am missing?
It could continue to use the same behavior it has now. That is, if I invoke my greeting macro on a new email the result is simply "Hi,".
Can you test if it's a reply, forward, or new?
If a variable doesn't exist within a macro, don't emit anything.
BTW: I appreciate that this request is pushing quicktext to expand from a macro expander to an email template system, which could be out of scope. In the past, I paid for SmartTemplates just for the ability to have an automatic greeting. But when they moved to an annual fee, I thought that was too much just to say "Hi [[name]]".
after a bit of work i have manage to somehow solve the problem (not autoaplied but almost with keyword) of this treath by using 3 adapted community scripts (also adding different signatures depending if its new mail or Re:/Fwd:)
you can also aply it after writting the email just making sure to select written text and greeting will be placed at start and signature at end (above the Re:/Fwd: message text)
the scripts used are:
1.-CleanSubject (used as it is and added following scripts depending if ""/"Re: "/"Fwd: " is the starting subject to edit greeting and signature imputed from templeate)
2.-GoodMorning (modified hours and added ToNickname into greeting string)
3.-ToNickname (modified so that if neither nickname nor firstname is present "" is returned an only greeting is written)
4.- GetMailBody (unmodified)
-so if new mail will be shown like:
Good (morning/evening...) ToNickname,
| (cursor will be here)
full signature (html)
-Re: mail will be like:
Good (morning/evening...) ToNickname,
| (cursor will be here)
small signature (html)
-Fwd: mail will be like:
FYI
| (cursor will be here)
small signature (html)
my full composition will be like:
templates inside "saludos" folder:
name mail : this will add full scripted template (input type HTML)
[[SCRIPT=filtrado]]
name firm : this will add full html signature (input type HTML)
[[CURSOR]][[FILE=C:\firm.html]]
name respose : this will add short html signature (input type HTML)
[[CURSOR]][[FILE=C:\response.html]]
Scripts:
name greeting (edited GoodMorning Script)
var date = new Date();
if (date.getHours() <12) return "Good morning "+"[[SCRIPT=to]]"+",<br><br>";
if (date.getHours() < 20) return "Good afternoon "+"[[SCRIPT=to]]"+",<br><br>";
if (date.getHours() > 20) return "Good night "+"[[SCRIPT=to]]"+",<br><br>";
return "Hello"+[[SCRIPT=to]]+",<br><br>";
-name to (edited ToNickname) added blond text
var data = this.mQuicktext.process_to(mVariables);
// use name if nickname is not available
if(typeof data['nickname'] == 'undefined') {
data['nickname'] = [];
}
for(var i = 0; i < data['firstname'].length; i++) {
if(typeof data['nickname'][i] == 'undefined') {
**if(typeof data['firstname'][i] == 'undefined') {
data['firstname'][i] = " ";
}**
data['nickname'][i] = data['firstname'][i];
}
}
if(typeof data['nickname'] != 'undefined') {
if(mVariables.length < 1) mVariables[0] = ", ";
return data['nickname'].join(mVariables[0].replace(/\\n/g, "\n").replace(/\\t/g, "\t"));
} else return "";
changed the title [-]Feature Request: Set a default template to be automatically applied on a new/replied/forwarded email[/-][+]Feature request: Set a default template to be automatically applied on a new/replied/forwarded email[/+]on Jun 3, 2021
I am not sure how it could be implemented especially on a new email. The question is when the template should be applied.
How about per this below? Shorted top down during the initial one time configuration top-down:
Per email account. And per identity.
First, implement this new feature per email account. And optionally, per identity.
On new email, reply, forward
Then, optionally, choose one script on write new email or on reply or on per forward
Activate or deactivate
Next, optionally, activate the script or not, on write new email or on reply or on per forward
Quicktext somehow easily find the reusable script
After that, somehow store the script into an appropriate location. So that in the future, quicktext can find it when it's automatically triggered
This screenshot shows this suggestion
Maybe some of this could be recycled as inspiration for the logic? Or maybe some code too? As, it's from SmartTemplate4. Which is also Libre/Open Source.
Activity
SamuelPlentz commentedon Nov 4, 2020
Duplicate of #163. The name of the issue is better here though.
We should close the other one.
xpseudonym commentedon Feb 2, 2021
My apologies for a 'me too' post - but, I'd also like to thank John for his work porting this and Emil before him - do you drink coffee; can I buy you one :)
So, yes, a default would save one more repetitive mouse click.
reagle commentedon Feb 12, 2021
Yes! Just landed here to see how this was done so I don't have to keep manually invoking my
Hi [[TO=firstname]],\n\nmacro.SamuelPlentz commentedon Feb 13, 2021
I am not sure how it could be implemented especially on a new email. The question is when the template should be applied.
If it would be applied directly on start of a new email a variable like
[[TO=firstname]]is useless, as one didn't add the recipients yet. This is similar when forwarding an email. A reply would usually be fine with it.If it would be applied when adding the first recipient one could already have written parts of the email and it might be an unwanted 8000 action to add the template at this point.
On the other way a script like CleanSubject would work fine with (1) also when forwarding.
How would you think it should work? Would you use it just for replies with (1) or do you see any other use cases for new and forwarded emails, that I am missing?
reagle commentedon Feb 13, 2021
Good points, a couple options:
BTW: I appreciate that this request is pushing quicktext to expand from a macro expander to an email template system, which could be out of scope. In the past, I paid for SmartTemplates just for the ability to have an automatic greeting. But when they moved to an annual fee, I thought that was too much just to say "Hi [[name]]".
daelrum commentedon May 5, 2021
Hello all,
after a bit of work i have manage to somehow solve the problem (not autoaplied but almost with keyword) of this treath by using 3 adapted community scripts (also adding different signatures depending if its new mail or Re:/Fwd:)
you can also aply it after writting the email just making sure to select written text and greeting will be placed at start and signature at end (above the Re:/Fwd: message text)
the scripts used are:
1.-CleanSubject (used as it is and added following scripts depending if ""/"Re: "/"Fwd: " is the starting subject to edit greeting and signature imputed from templeate)
2.-GoodMorning (modified hours and added ToNickname into greeting string)
3.-ToNickname (modified so that if neither nickname nor firstname is present "" is returned an only greeting is written)
4.- GetMailBody (unmodified)
-so if new mail will be shown like:
-Re: mail will be like:
-Fwd: mail will be like:
my full composition will be like:
templates inside "saludos" folder:
Scripts:
-name to (edited ToNickname) added blond text
main script named filtrado
jobisoft commentedon Jun 3, 2021
The new WebExtension APIs will make that easy, postponing.
[-]Feature Request: Set a default template to be automatically applied on a new/replied/forwarded email[/-][+]Feature request: Set a default template to be automatically applied on a new/replied/forwarded email[/+]Francewhoa commentedon Dec 14, 2021
I am also interested in this new feature. If needed, I would be happy to contribute testing and documentation.
Francewhoa commentedon Dec 14, 2021
How about
How about per this below? Shorted top down during the initial one time configuration top-down:
First, implement this new feature per email account. And optionally, per identity.
Then, optionally, choose one script on write new email or on reply or on per forward
Next, optionally, activate the script or not, on write new email or on reply or on per forward
After that, somehow store the script into an appropriate location. So that in the future, quicktext can find it when it's automatically triggered
This screenshot shows this suggestion

Maybe some of this could be recycled as inspiration for the logic? Or maybe some code too? As, it's from SmartTemplate4. Which is also Libre/Open Source.
myde2001 commentedon Aug 15, 2023
Hi, still nothing new on this topic? It would be great to have. Thanks