Roundcube Community Forum

 

Plugin to send EML file to local executable?

Started by BrianPackard, September 07, 2011, 06:22:30 PM

Previous topic - Next topic

BrianPackard

Hello,

I need to develop a plugin to send a EML file to a local executable.  The best way to do this is to save the EML file locally to a temp file and then open the executable with the path as a argument.  For example, save the eml file to c:\temp\email.eml and open the program with c:\program.exe "c:\temp\email.eml"

I am kinda lost as to how to do this and was hoping there may be a existing plugin with a similar design that I can pick apart to try and figure this thing out, any ideas?

Best Regards,

Brian

SKaero

Browsers don't have the capability to run programs, what you'd need to do is set .eml files to automatically open with that program in Windows.

BrianPackard

I just registered a new protocol on the machine locally so if I could redirect a new window to ProgramName:\\pathto.eml it should work as well.  This way I do not have to disrupt other software that might use EML files.  It works when typing it into the browser directly, but i still need to be able to automatically export locally (or to a share on the server, as this is all in-house)  and open a new window.  Every time i try anything now it seems i keep getting a server error(OK) message so I think i am going in the wrong direction for the plugin at least.

Is there an easy way to open a new window?  I can redirect however that is all still within the mail site's domain.

SKaero

In that case the plugin would need to mainly be JS, in JS you can open a new window with:
newwindow=window.open('ProgramName:\\pathto.eml','','height=700,width=1200');