Community Discussions and Support
help with email/fax routing rule

Must have missed something as I now have the vbscript firing as expected.  Sorry for the false alarm.

Must have missed something as I now have the vbscript firing as expected.  Sorry for the false alarm.

Hello community,

 I have been struggling with using Mercury/32 to accomplish the following task.  Accept email from a MFP device which is utimately destined for an internet fax service , change some header information, then send the mail on its way to a smart host for delviery.

Process would be:

  • Read the "TO:"  header (retain this information in variable?) which comes in this format; "To: "/Fax=18005555555/" <useremailaddress@userdomain.com>"
  • Change the "TO:" header (using the stripped portion of the above variable) to this format; "To: <18005555555@faxservice.com>"
  • Change the "From:" header to "From: <FaxEmailAddress@userdomain.com>"

 I can use global rules to replace the From: address header but the TO: address needs to be derivitive from the original TO: address header.

Any ideas on how I could get this accomplished?  One thought was to save the original email message to a file, then run a vbscript to replace text within the file then resend as email.  I 'd rather keep the process handled within the administration of Mercury/32 if possible.

 Regards,

Marty

 

&lt;P&gt;Hello community,&lt;/P&gt; &lt;P&gt;&amp;nbsp;I have been struggling with using Mercury/32 to accomplish the following task.&amp;nbsp; Accept email from a MFP device which is utimately destined for an internet fax service&amp;nbsp;, change some header information, then send the mail on its way to a smart host for delviery.&lt;/P&gt; &lt;P&gt;Process would be:&lt;/P&gt; &lt;UL&gt; &lt;LI&gt;Read the &quot;TO:&quot; &amp;nbsp;header (retain this information in variable?)&amp;nbsp;which comes in this format; &quot;To: &quot;/Fax=18005555555/&quot; &amp;lt;useremailaddress@userdomain.com&amp;gt;&quot;&lt;/LI&gt; &lt;LI&gt;Change the &quot;TO:&quot; header (using the stripped&amp;nbsp;portion of the above variable)&amp;nbsp;to this format; &quot;To: &amp;lt;18005555555@faxservice.com&amp;gt;&quot;&lt;/LI&gt; &lt;LI&gt;Change the &quot;From:&quot; header to &quot;From: &amp;lt;&lt;A href=&quot;mailto:FaxEmailAddress@userdomain.com&quot;&gt;FaxEmailAddress@userdomain.com&lt;/A&gt;&amp;gt;&quot;&lt;/LI&gt;&lt;/UL&gt; &lt;P&gt;&amp;nbsp;I can use global rules to replace the From: address header but&amp;nbsp;the&amp;nbsp;TO: address needs to be derivitive from the original TO: address header.&lt;/P&gt; &lt;P&gt;Any ideas on how I could get this accomplished?&amp;nbsp; One thought was to save the original email message to a file, then run a vbscript to replace text within the file then resend as email.&amp;nbsp; I &#039;d rather keep the process handled within the administration of Mercury/32 if possible.&lt;/P&gt; &lt;P&gt;&amp;nbsp;Regards,&lt;/P&gt; &lt;P&gt;Marty&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt;

No variables are available to rules, so your 'save-script-resend' thought would be the way to go.

No variables are available to rules, so your &#039;save-script-resend&#039; thought would be the way to go.

A daemon could probably do it, but that would require some programming skills. It seems you will need to change the envelope address for the message as well, not only the header inside the message.

/Rolf 

&lt;p&gt;A daemon could probably do it, but that would require some programming skills. It seems you will need to change the envelope address for the message as well, not only the header inside the message.&lt;/p&gt;&lt;p&gt;/Rolf&amp;nbsp;&lt;/p&gt;

[quote user="Rolf Lindby"]

A daemon could probably do it, but that would require some programming skills. It seems you will need to change the envelope address for the message as well, not only the header inside the message.

/Rolf 

[/quote]

 

I checked out the SDK and writing a daemon is beyond what I could do right now.  Are there any developers in the community that could write this for a fee?

[quote user=&quot;Rolf Lindby&quot;] &lt;P&gt;A daemon could probably do it, but that would require some programming skills. It seems you will need to change the envelope address for the message as well, not only the header inside the message.&lt;/P&gt; &lt;P&gt;/Rolf&amp;nbsp;&lt;/P&gt; &lt;P&gt;[/quote]&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I checked out the SDK and writing a daemon is beyond what I could do right now.&amp;nbsp; Are there any developers in the community that could write this for a fee?&lt;/P&gt;

[quote user="dilberts_left_nut"]No variables are available to rules, so your 'save-script-resend' thought would be the way to go.
[/quote]

Have this about 90% done. 

Run into one thing I can't seem to find an answer on.  How can I get the "Run a Program" action to run a vbscript file.  I have tried "c:\windows\system32\cscript.exe c:\mercury\rules\test.vbs" and "c:\mercury\rules\test.vbs" as the parameter .  Neither seems to work. 

I can run a batch file that calls the test.vbs vbscript but don't think adding an additional step is a good solution.  I need it to be silent as well.

 Any other ideas?  Will .vbs files not run directly from the "Run a Program" action or am I hosing up the syntax?

&lt;P&gt;[quote user=&quot;dilberts_left_nut&quot;]No variables are available to rules, so your &#039;save-script-resend&#039; thought would be the way to go. [/quote]&lt;/P&gt; &lt;P&gt;Have this about 90% done.&amp;nbsp; &lt;/P&gt; &lt;P&gt;Run into one thing I can&#039;t seem to find an answer on.&amp;nbsp; How can I get the &quot;Run a Program&quot; action to run a vbscript file.&amp;nbsp; I have tried &quot;c:\windows\system32\cscript.exe c:\mercury\rules\test.vbs&quot; and &quot;c:\mercury\rules\test.vbs&quot; as the parameter .&amp;nbsp; Neither seems to work.&amp;nbsp; &lt;/P&gt; &lt;P&gt;I can run a batch file that calls the test.vbs vbscript but don&#039;t think adding an additional step is a good solution.&amp;nbsp; I need it to be silent as well.&lt;/P&gt; &lt;P&gt;&amp;nbsp;Any other ideas?&amp;nbsp; Will .vbs files not run directly from the &quot;Run a Program&quot; action or am I hosing up the syntax?&lt;/P&gt;
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