Pages: 1
RSS
Can I use macro in Sorting Office rule?
 
Simple version - Just for testing:

  In a sorting rule - I forward the message to %CCLIST
  Thus anyone on the CC of the original message should get another forwarded copy
  This doesn't work for me.
  Result: Outbox has the message with
       To %CCLIST

I have a much more advanced and practical use for this ... but first I need to know that I can actually use macros in the sorting rules


Currently on Windows 11 with The Bat! 10.0.10 (32-bit).  .... I fear upgrading to current version in case other stuff breaks but if that's the issue, I'll have to consider it.

Thank you for any insight!

P.S. I'm sure this has been answered many times --- I thought I was capable at figuring search terms but I could not find an answer. Sorry if this newbie question is annoying.
Edited: Bill Jensen - 10 February 2025 20:00:30
 
Have you tried %OCCLIST ? That would be the CC: list of the original message.
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
 
Thank you. Unfortunately, that didn't change anything.

Based on your suggestion, I tried %OCCLIST instead and got the same result.
I feel like there's something I'm missing as The Bat! appears to be not replacing the variables with the variable data

In the email Outbox - there's the message that was intended to be forwarded with the "To:%OCCLIST"

I confirmed there was a CC in the list as the CC recipient did get the original message but not the forwarded one.

======================================

This is what the log file looks like:
2025-02-11, 21:47:54: SEND  - The last address submitted was <%OCCLIST>
!2025-02-11, 21:47:54: SEND  - Message has not been sent. Server reply - 5.1.3 specifications. d9443c01a7336-21fb9556ea7sm22608705ad.47 - gsmtp
2025-02-11, 21:47:54: SEND  - connection finished - 0 message(s) sent
2025-02-11, 21:47:54: SEND  - Some messages were not sent - check the log for details
Edited: Bill Jensen - 12 February 2025 07:56:56 (Added "thank you")
 
When you're making the forwarding action in the Sorting Office, you get a dialog that shows a template for the forwarded message.

If you add this command to the template, your message will be forwarded to the original CC: recipients:

%TO="%OCCLIST"
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
 
Thank you !!

That was the issue. I was putting the variable setting in the forwarding field of the rule rather than in the template. It seems that it should also work in the rule - or at least be aware enough to warn not to put macros in the rule itself.

Regardless - I have enough here to solve my problem.

Thank you again for taking the time to help some random person somewhere in the world who can only return a "thank you".
 
Glad to hear that it works, even as just a workaround -- and good luck with your project!
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
Pages: 1