"Reply with Template" Filter replies to From field, not Reply-To field

RESOLVED FIXED in Thunderbird 22.0

Status

MailNews Core
Filters
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: pete, Assigned: rkent)

Tracking

unspecified
Thunderbird 22.0
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10

In Mail Filters, a ""Reply with Template" action replies to the From field in the incoming mail header, instead of the "Reply-To" field. There is no way to specifically select to use either one, and it, incorrectly I believe, replies to the sender.

This has been causing me a problem in this example:
I often get emails from an auction site, for example, that informs me of a winning bid. It sends the email to me, on the sellers behalf, so I can hit reply to the seller directly because the sellers email is in the Reply-To field. My "Reply with Template" filter is set to automatically send my contact details to the seller...or so I thought. It ends up replying back to the auction mailbot, not the seller.

Reproducible: Always

Steps to Reproduce:
1. Set up a "Reply with Template" filter
2. Receive an email from an account that has a different Reply-To address than the sender


Actual Results:  
The filter action sends the template to the sender.

Expected Results:  
The filter action should send the template to the email address(es) in the Reply-To field in the incoming mail header.
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
indeed
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

5 years ago
Hello -

I have the same problem, and for a shop in a Venue... it's annoying.

Using this kind of procedure:
http://www.ehow.com/how_8657855_use-templates-thunderbird.html

... TB sends the template email to the From address (the Venue), and NOT the Reply-To address (the Buyer).

I'd like to add it worked with no problem for 2 years at least, using the same account/configuration but in POP3.
It doesn't work correctly since we very recently swapped to IMAP.

I tried it again today, and still doesn't work.
v.12.0.1, released: April 30, 2012

Thanks in advance !

Comment 3

5 years ago
I am having the same problem and I'm hoping to revive this request.  Can anybody recommend a solution or come up with a fix for IMAP (can not use POP).  The problem is clearly described above.  The "reply with template" filter action replies to the sender, and not the "reply to" email address.

Your help would be greatly appreciated.

Comment 4

5 years ago
I would also like to revive this bug! Please help us fix this one.

It has been tested and is a problem on:

Windows XP
Windows 7
and
Windows 8
(Assignee)

Comment 5

5 years ago
Looking briefly at the underlying code, I am guessing without test that the "From" comes from this code in nsMsgComposeService.cpp:
 
949   nsCString replyTo;
950   mHdrToReplyTo->GetStringProperty("replyTo", getter_Copies(replyTo));
951   if (replyTo.IsEmpty())
952     mHdrToReplyTo->GetAuthor(getter_Copies(replyTo));

We also have this comment in nsMsgComposeService::ReplyWithTemplate:

1086   // We need the reply-to header of the msg we're replying to, so
1087   // we're going to add that to the db if it's different from "from:"
1088   // For imap, we could make adding a reply-to filter append
1089   // reply-to to the custom headers...

Looking through the protocol and parse code, it seems to me like you could follow those instructions, that is add reply-to to the preference mailnews.customDBHeaders and this should work.

I tried this, and it seemed to work for me. So just add reply-to to that preference, and see if it starts to work.

If so, then I suggest that this bug be morphed into a request to add Reply-To to the default list of headers that are downloaed for IMAP.

Comment 6

5 years ago
James, thank you kindly for your suggestion.  Can you please provide a little bit more guidance as to which files to modify, and where and how?  I'm not computer illiterate, just not a programmer.

Where are the configuration files that need to be changed, and what lines do I change?
(Assignee)

Comment 7

5 years ago
In Tools/Options/Advanced/General click on "Config Editor..." and search for mailnews.customDBHeaders. Modify that so that it has the value "reply-to" (no quotes)  (if there is any existing value, then add a space followed by reply-to).
(Assignee)

Comment 8

5 years ago
Created attachment 713047 [details] [diff] [review]
Add default imap Reply-To header

Is there any reason why we can't just add reply-to to the list of IMAP headers like this?
Assignee: nobody → kent
Status: NEW → ASSIGNED
Attachment #713047 - Flags: review?(irving)

Comment 9

5 years ago
Hi James, I added "reply-to" (without quotes) in the "value" field of the config editor for the line item mailnews.customDBHeaders.

I then re-ran the rule after restarting thunderbird, and it still replied to the from address.

I'm not sure if this matters, but I am on an IMAP account.

Did I apply the proposed change incorrectly?  Thanks again.
(Assignee)

Comment 10

5 years ago
This would only work for a newly received message. For it to work on old messages, you have to rebuild (repair) the folder.

Comment 11

5 years ago
Kent James:

Thank you for the help your fix seems to work perfectly, it is greatly appreciated this will save me a lot of manual labor! Is there any way I can donate to you or the Thunderbird team somehow?

customled:

After making the change in Config Editor right click the folder that your emails you want to auto-reply are in then click "Properties..." in General Information click "Repair Folder" then try your filter.
(Assignee)

Comment 12

5 years ago
I have never accepted donations for my Mozilla work, so let's not go down that path. (Not that I am a free-as-in-beer fanatic, in fact I have been a major voice for more effective monetization of the Thunderbird project).

In theory you are supposed to be able to donate to specific projects, but looking at the page that the Mozilla website sends you to (http://mozilla.bluestatedigital.com/page/content/donate) there is no entry for "Thunderbird". I guess that just shows how backwards we really are in monetization!

So unless one of the cc folks here have a suggestion, I guess your option is a general Mozilla foundation contribution. They continue to provide critical support for Thunderbird.

Comment 13

5 years ago
You are correct.  It does work on new incoming messages.  Thank you so much, this really is a life saver for my business.  

Question: if an incoming email is received where the "reply-to" field is blank, will the filter default to the from address?

Regards,

Jon

Comment 14

5 years ago
Kent James: Well if you were in the area I'd get you a 24 pack.

Jon: Yes if there is no reply-to address it defaults to the from address.

Comment 15

5 years ago
James: Since you so handily solved that issue with the reply with template action, I'm wondering if you can take at one more issue with this message filter action.

The rule generated reply email contains the selected template, with a modified subject line.  It combines the subject of the selected template, and then adds (was: "origonal email subject").  Is there any way to just replace the origonal subject with that of the template, and not to append the subject?

Thank you again for your time and expertise.
(Assignee)

Comment 16

5 years ago
sales@customled.com:

The "was: " portion is hard-wired in this code in nsMsgComposeService.cpp:

958   mTemplateHdr->GetMime2DecodedSubject(templateSubject);
959   mHdrToReplyTo->GetMime2DecodedSubject(replySubject);
960   if (!replySubject.IsEmpty())
961   {
962     templateSubject.Append(NS_LITERAL_STRING(" (was: "));
963     templateSubject.Append(replySubject);
964     templateSubject.Append(NS_LITERAL_STRING(")"));
965   }
966   compFields->SetSubject(templateSubject);

That's tacky, as "was:" really needs localization.

So I think that to fix this without a core code change would require a custom filter action. It could probably be approached with javascript custom action in FiltaQuilla, if not by a new custom filter action there. But that is not work that I am going to undertake as a free project.
Comment on attachment 713047 [details] [diff] [review]
Add default imap Reply-To header

Review of attachment 713047 [details] [diff] [review]:
-----------------------------------------------------------------

Please file a separate bug to get the "was: " string internationalized, and another one for sales@customled.com's request to make appending the old subject optional.
Attachment #713047 - Flags: review?(irving) → review+

Comment 18

5 years ago
I think the " (was:  )" semi standard for changing topics isn't internationalizable. But then again i don't think its that much used either... maybe we could just remove the "was:" and have only the original subject in parenthesis.
(Assignee)

Comment 19

4 years ago
Comment on attachment 713047 [details] [diff] [review]
Add default imap Reply-To header

Checked in https://hg.mozilla.org/comm-central/rev/c3ea08d44704
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 22.0

Updated

4 years ago
Duplicate of this bug: 837833

Comment 21

4 years ago
I should note that using Reply-To for automatic replies is actually prohibited per 3834
http://tools.ietf.org/html/rfc3834#section-4 

It recommends to only use Return-Path, but that's not easily accessible...

Comment 22

4 years ago
Let's have the discussion about that in bug 335464.
You need to log in before you can comment on or make changes to this bug.