RealRaven2000 / SmartTemplates

Thunderbird Add-on: SmartTemplates
http://smarttemplates.quickfolders.org/
Other
25 stars 15 forks source link

How to make a conditional substitution in header? #193

Open macdeport opened 2 years ago

macdeport commented 2 years ago

Here is my quote header in reply tab:

On %X:=sent%%dateformat(d/m/Y H:M:S)% %from(name,bracketMail())% wrote:<br>
> To: %to(name,bracketMail())%[[
> Cc: %cc(name,bracketMail())%]]
> Subject: %subject%
> Message-ID: %Message-ID%
[[> Reply-to: %reply-to(bracketMail())%
]]>

How to suppress > Reply-to: %reply-to(bracketMail())% if %reply-to(mail)% is identical to %to(mail)%?

RealRaven2000 commented 2 years ago

How to suppress > Reply-to: %reply-to(bracketMail())% if %reply-to(mail)% is identical to %to(mail)%?

Hold on - the [[ ]] stuff (leaving out a line with an unused header variable) should only work if the header is missing, did you test that case? (What happens if reply-to is not set at all)?

Is the reply-to filled by Thunderbird when composer loads or is it already set when you receive the original mail?

macdeport commented 2 years ago

Hold on - the [[ ]] stuff (leaving out a line with an unused header variable) should only work if the header is missing, did you test that case? (What happens if reply-to is not set at all)?

This works up to version 3.12pre30

Is the reply-to filled by Thunderbird when composer loads?

Yes, because it a kind of redundant info to display useless for future use.

RealRaven2000 commented 2 years ago

Hold on - the [[ ]] stuff (leaving out a line with an unused header variable) should only work if the header is missing, did you test that case? (What happens if reply-to is not set at all)?

This works up to version 3.12pre30

we can compare - but are you saying that when you reply to the same email this is removed in an older version but not int the newer one? Can you send me an email (export as eml file) for testing off list?

Is the reply-to filled by Thunderbird when composer loads?

Yes, because it a kind of redundant info to display useless for future use.

the reply-to header can be set by the mail client on the other side, I believe it is not necessary. So it is really controlled by the mail you reply to (not by settings in your Thunderbird).

macdeport commented 2 years ago

but are you saying that when you reply to the same email this is removed in an older version but not int the newer one?

Exactly

I have sent you the EML file.

macdeport commented 2 years ago

Is the reply-to filled by Thunderbird when composer loads?

Yes, because it a kind of redundant info to display useless for future use.

Perhaps I was not clear enough I just want to avoid to put in my reply > Reply-to: %reply-to(bracketMail())% when %reply-to(mail)% is identical to %to(mail)%

RealRaven2000 commented 2 years ago

Right - I did some testing with the email you sent me, there was some confusion because the reply-to is hidden from the headers pane if it is identical (but it still is stored in the email) - this behavior was intentional. related bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=1743363

The big question here is should SmartTemplates do the same by default?