I changed the "send_subscription_email" macro to add the tag of SU!: to the front of the subject line. But that's creating two problems for me that I'd like to see if there is a way to fix:
1) The replies via aren't going into the same topic thread (because the subject line is now different with the SU!: appended) and 2) The subject line just keeps getting longer with Re: SU!: Re: SU!: Re: SU!: Re: SU!:… etc. for a topic that has a lot of discussion and replies. Most of my members prefer to interact completely via email. I added the SU!: to the subject line when the message is sent because they want to filter their emails from this system into a separate mailbox. So I need to come up with a way to solve these two problems. Thanks for your help. Coleen |
You can see an example of what I'm talking about here:
http://forum.sudsol.org/Buy-Sell-Trade-BST-ISO-f63.html Look at the 5 posts near the top with the Subject line that started as "Stocking Punch" (I manually moved the first reply under the original topic) Coleen |
In reply to this post by Coleen_Astalos
Is there a way to turn off the option to create a new topic for emails sent in where the subject line changes?
This would solve problem #1 of mine and make me a happy camper as I'm havnig to move the threads right now. Thanks, Coleen |
Please, see if this override can fix your problem:
<override_macro name="send_subscription_email" parameters="node_attr,text_part,html_part" requires="subscription"> <n.set_local_subscription.this_subscription/> <n.set_local_node.node_attr/> <n.block.> <n.comment.>Added category in from name</n.comment.> <n.new_email.> <n.send> <to.local_subscription.user.user_email/> <to_name.local_subscription.user.name/> <from.local_subscription.user.reply_address_for.local_node/> <from_name><n.local_node.owner.name/> [via <n.local_node.get_app_node.subject/>]</from_name> <subject.> SU!: <n.regex_replace_all text="[n.local_node.subject/]" pattern="Re: SU!:" replacement=""/> </subject.> <text_part.text_part/> <html_part.html_part/> <set_headers_for.local_node/> <bounce_to.local_subscription.user.bounces_address/> </n.send> </n.new_email.> </n.block.> </override_macro>I'm eliminating the many "Re: SU!:" pieces from the subscription email.
My test forum.
|
This is not working. What I'm seeing now is the subject lines look like this:
SU!: MDSM44 Challenge digital New Year card (with a big space at the start of the subject line) - even if the topic is a brand new topic and no replies. Coleen |
I even tried deleting any spaces in front of and after SU!: in the text and get the same thing. I've backed out the changes for now.
Coleen |
You may add a space at the searched pattern:
replace this: <n.regex_replace_all text="[n.local_node.subject/]" pattern="Re: SU!:" replacement=""/>with this: <n.regex_replace_all text="[n.local_node.subject/]" pattern="Re: SU!: " replacement=""/>
My test forum.
|
This still isn't working. Now what I'm seeing is the subject line repeated like this:
SU!:RE: heat tool incidentRE: heat tool incident (Although I don't have the spaces at the front of the subject line anymore, so that's good). So many email programs work differently. Some strip off the SU!: realizing it's a tag (my Outlook does that). Some use upper case RE: and some lower case Re: Is there a way to repeat this stripping of the tags multiple times - for example, the first time strip of any Re: the second time thru strip off any SU!: and if necessary a 3rd time to strip of any upper case RE: 's (if it's case sensitive) That would ensure we have a clean subject line each time (and that should cause the posts to go under the same thread - right?) Coleen |
Sorry, my fault in the duplication of the subject line. I still had the <subject.local_node.subject/> in there before the <n.regex_replace_all text="[n.local_node.subject/]" pattern="Re: SU!: " replacement=""/> line.
Let me watch it tonight and see what I end up getting. I do like the idea of completly stripping of all the Re:'s as I have noticed that the upper/lower case Re:'s / RE:'s do cause messages to not end up going under the same thread. Coleen |
Well, once I removed the <subject.local_node.subject/> I got the blanks in the subject line back after the SU!: and before the subject line. It looks to me like it's maybe the indentation of the <n.regex_replace... line. But if I remove the spaces before it (so it starts in Column 1) then I just get SU!: for the subject line and nothing else.
I've had to roll the changes back so my members don't get to pissed off at me (they're already mad enough about having to learn a new system). Is there a way we can just turn off the code that creates a new topic if the subject line changes - that will solve 1/2 of my problem at least. Thanks, Coleen |
The regex_replace search for a pattern using a Regular expression, so that you can use the rules you want. Search for "SU:" or "SU.:" , for "SU:" once and "SU: Re:" many times, etc.
What should we do when we receive the email?
My test forum.
|
That's great, but I don't know how to write it so that it first say removes all the "Re:"s and then removes all the "RE:"s and then all the "SU!:"s. I tried to do it by just putting mulitple regex's one right after the other like this: <n.regex_replace_all text="[n.local_node.subject/]" pattern="Re: " replacement=""/> <n.regex_replace_all text="[n.local_node.subject/]" pattern="RE: " replacement=""/> <n.regex_replace_all text="[n.local_node.subject/]" pattern="SU!: " replacement=""/> But what I ended up with was 3 different versions of the subject line concatenated in the email subject line. It should go into the original topic that it was replied to. Coleen |
I hope I don't confuse you by adding extra info here. I think we really have two separate issues we are talking about:
1) Getting rid of the extra tags at the front of replied to emails. 2) Making sure email replies to the same topic end up under the same thread on the forum. I *thought* they were connected, that if we could do #1 then #2 would happen naturally. But now I don't think that is the case, and this is why. See this picture of 3 new topics that have the EXACT same subject line. Yet even though the subject lines matched, new topics were created. So even if we fix #1 above - which I still woudl like to do as I think it will be easeir to read the subject lines. It doesn't mean that #2 happens automatically. We still need to make sure that replies to a topic get added to the topic replied to (even if the subject line changes). Thanks, Coleen |
Were these multiple topics created by replying by email? Remember that you can create topics by email, so that they can have the same subject.
Instead of filter by header, why don't you filter our emails by the sender address, which must contain "nabble" in it? You can use your regex like this: <n.regex_replace_all text="[n.local_node.subject/]" pattern="(Re: |SU: |RE: )*" replacement=""/>
My test forum.
|
I believe she sent the same email 3 times to the nabble system as new emails. Is that why the system created 3 new topics? I thought that if the subject line was the same (and they were going to the same subcategory) that it would compile them into the same topic online. Perhaps a misunderstanding on my part. The regex change you gave me works well (no spaces anymore). So let me just watch some of the topics to see if the replies are going into the same topic thread on the forum like I expect. So far on the forum, I've been manually moving all the email replies - moving them under the original post (since with the SU! tag added to the subject line was causing them to generate new topics on the forum.) I should be able to tell fairly quickly in the morning how it's working after the regex change and I will let you know. Thanks, Coleen |
So here is another example where the topics aren't being put together properly on the forum (these pictures are from the forum itself and not my email):
The initial post was made by janinpb via the website in the category "Business Talk" at 10:46am. At 12:46 another member replied to Jan's post via email - this response was correctly put under the original topic as shown here: Notice the subject line of the replied post does not have the SU!: in it - likely because her email program stripped it off realizing it was a tag (my outlook does this as well) At 1:42 another member replied to the original post via email - this response was not put under the original topic" Notice the subject line of this one still has the SU!: in it (all outgoing emails are tagged with the SU!: tag). While I've gotten rid of any extra SU!:, Re: and RE: in the outgoing emails now, there is still the one (which I need for my users to be able to filter their emails from our list to a separate mailbox folder). So, I'm back to the original request. Is there a way to make sure that all email replies to a topic get put under that topic in the forum, regardless of whether the subject line changes? Coleen |
Override your prefixes macro:
<override_macro name="prefixes" requires="post_by_email"> re|aw|res|fwd|答复|su! </override_macro>
My test forum.
|
What's the 4th one that shows as chinese characters?
Also is it case dependent at all - should I include both RE and re? Thanks, Coleen |
It is not case sensitive. Just add "su!" .Did you have problems with "Re"? I think it's only with "su!".
The forth is a default tag if you use Nabble in other language.
My test forum.
|
I'll try this and see how it works. I have noticed the RE: in several, but they may also have had the SU!: So I'll try it with just adding the SU! and watch to see see how it works.
Thanks, Coleen |
Free forum by Nabble | Edit this page |