Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: BrianPackard on September 07, 2011, 06:22:30 PM

Title: Plugin to send EML file to local executable?
Post by: BrianPackard on September 07, 2011, 06:22:30 PM
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
Title: Plugin to send EML file to local executable?
Post by: SKaero on September 08, 2011, 01:05:48 AM
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.
Title: Plugin to send EML file to local executable?
Post by: BrianPackard on September 08, 2011, 10:03:50 AM
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.
Title: Plugin to send EML file to local executable?
Post by: SKaero on September 09, 2011, 12:28:27 AM
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');