Community Discussions and Support
Rule to reply with attachment

Sorry for the delay to answer, I've been quite busy.

You're right, the solution was to send a binary file to the originator and it works fine.

Thanks for your help.

Regards

<p>Sorry for the delay to answer, I've been quite busy.</p><p>You're right, the solution was to send a binary file to the originator and it works fine.</p><p>Thanks for your help.</p><p>Regards </p>

Hi there

I'm wondering how I could to the following :

If a message is sent to an address managed by Mercury a reply is sent to the sender (I can do this with an alias redirected to a rule) but, and that's my problem, I want to attach to the reply a file that can change all the time and I don't want to modify my reply template each time I modify the attached file.

How could be the rule to do that ?

Thanks for your help

<p>Hi there</p><p>I'm wondering how I could to the following :</p><p>If a message is sent to an address managed by Mercury a reply is sent to the sender (I can do this with an alias redirected to a rule) but, and that's my problem, I want to attach to the reply a file that can change all the time and I don't want to modify my reply template each time I modify the attached file.</p><p>How could be the rule to do that ?</p><p>Thanks for your help </p>

I would probably use a "Run a program" filter and have a batch file to handle address parsing and mail generation with say msendto or such.

It really depends on the details of what you really want.

How do you know which attachment etc ...

<p>I would probably use a "Run a program" filter and have a batch file to handle address parsing and mail generation with say msendto or such.</p><p>It really depends on the details of what you really want.</p><p>How do you know which attachment etc ... </p>

The attachment is always the same filename, at the same place, its content change from day to day.

I didn't think to the "run a program" solution, I could do something with Blat.

I just have to look how I could pass the sender's address to Blat or MSendTo.

Thanks for your help

<p>The attachment is always the same filename, at the same place, its content change from day to day.</p><p>I didn't think to the "run a program" solution, I could do something with Blat. </p><p>I just have to look how I could pass the sender's address to Blat or MSendTo.</p><p>Thanks for your help </p>

A policy can supply those details to the program to be run, the only problem is it calls the program for EVERY msg.

You can programatically escape early in the script or run it after filtering (FWIW) but it is still a significant overhead.

 

Otherwise, you can parse the message using something like:

[quote]

for /f "delims=<> tokens=2" %%F in ('findstr /B "From:" *.cnm') do echo Mail is from %%F

[/quote]

 to get the address to pass as a parameter to blat or such.


Does the "Send [binary|text] file to originator" rule action not do what you want?
&lt;p&gt;A policy can supply those details to the program to be run, the only problem is it calls the program for EVERY msg.&lt;/p&gt;&lt;p&gt;You can programatically escape early in the script or run it after filtering (FWIW) but it is still a significant overhead.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Otherwise, you can parse the message using something like:&lt;/p&gt;&lt;p&gt;[quote]&lt;/p&gt;&lt;p&gt;for /f &quot;delims=&amp;lt;&amp;gt; tokens=2&quot; %%F in (&#039;findstr /B &quot;From:&quot; *.cnm&#039;) do echo Mail is from %%F&lt;/p&gt;&lt;p&gt;[/quote] &lt;/p&gt;&lt;p&gt;&amp;nbsp;to get the address to pass as a parameter to blat or such.&lt;/p&gt; Does the &quot;Send [binary|text] file to originator&quot; rule action not do what you want?
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft