Create .MSG or .OFT Outlook Files From HTML (via JavaScript) - javascript

The Need:
Essentially I have a tool that creates HTML Emails. A feature I would like to add for this tool is to create .MSG or .OFT files for use specifically in Outlook so the client doesn't have to load the HTML into outlook and create their own .MSG or .OFT files manually. This has to be done in either PHP or JS via my tool, NOT done manually in Outlook.
The Problem
It appears these files are Binary Files and I cannot find a JS Library that handles the conversion. If the client uploads the HTML directly into Outlook, then Outlook modifies the HTML in such a way that it often breaks the email. If I had more control over the conversation I could hopefully fix a few of the rendering issues.
What I've Tried
I exported .EML Files successfully, but once imported into Outlook and converted, these too break in the same manner as straight HTML.
Any thoughts greatly appreciated.

Related

Get the folder path of a file in Dynamics NAV without using FileManagement.OpenFolderDialog

I am trying to get the folder path of a file (e.g. "C:\folder\file.exe") in Dynamics NAV/CAL.
It is trivial to do by using the standard Microsoft Codeunit 419 - File Management, as OpenFolderDialog does exactly that.
Unfortunately this uses DotNet which does not work in the Webclient (specifically System.Windows.Forms.OpenFileDialog).
Any ideas how that functionality can be implemented in a way that works in the Webclient (preferably without a Javascript Addin, but if there is nothing else, I would consider that, too.)
You can't use the Folder Browse Dialog on the Web Client. You'll need to redesign your solution around this limitation (of web browsers, not necessarily NAV).
You can only upload files using the standard UPLOAD function, or using a Javascript Add-in with a HTML File Browse form.
If you're trying to get just the folder path of the C:\folder\file.exe you would use
DirectoryName := FileMgt.GetDirectoryName(Filename)
Shouldn't Upload function automatically rise dialog box even on web client?

Possible download / upload manager embedded on html page with access to local filesystem

As the title indicates i want to have a certain application get access to the local file system. To describe why i will illustrate my situation:
I am a running a IIS WebApplication with the C# MVC 4 Framework as backend module. The site solely consists of HTML, CSS markup and some JS. The page will be loaded in IE11+ (Edge) only. For the standard procedure of displaying and accessing data from as well as sending data to the server this works quite fine.
On a certain page I want the user to be able to upload a file using a simple file dialog, like the one you can initiate with a simple <input type="file"> tag. I also want to offer the posibility to download files from the server but need to know where files has been saved / will be saved to.
As described on a lot of different websites, just like this one here, the HTML5 File API does a great job but will not be able to return the full qualified filename including the local path directions, same for JS accessing the file object.
As my research confirmed HTML5, JS and also SWF (Flash) will not report detailed information because they are all sandboxed applications or restricted by RFCs. I already unterstood and appreciate the effort to secure my trips to internet.
But in this case do need the paths where a file was upload from and the file has been downloaded to.
So my question is, what is the best way to expose the full path directions for a up- as well as downloaded file to report them back to the server?
Is it possible to embed a SWF object inside HTML which will run inside an Adobe AIR sandbox or is a signed JAVA Applet still the one and only solution to accomblish this security breaking task?
A solution i would also apreciate would be the possiblity to ask the user to get access the file system, like you grant access to the web push service to receive notifications.
Also if there is a possible solution which may suite my circumstances please let me know by adding some simeple examples / revealing some factful links, thanks in advance.

Create automatic low & high res pdf, png with inDesign for multiple user

I am working on a platform, which should create from an inDesign file a low and high-res pdf, a png and maybe a new indesign file with the new data.
These steps are in my mind.
User logins or create a new login with his personal data, for
example: firstname, lastname, address, telephone and web.
There is an indesign file for example a business card, with
placeholders for firstname etc.
The script / plugin / addon should open the file with the xml,csv
and create these files and save it automatically in a dir.
I can work with these files
When you guys know a software, plugin, ... which can handle it, it would be awesome when you could help me. I want to work with php, jquery, html etc. after it for a webbased portal.
This is totally doable with Adobe InDesign Server, which provides the core document composition functionality. Unfortunately this has to run on a Mac or Windows server, but you can call it from PHP via SOAP. The process would be, basically:
Your web page captures the personal data.
You send a SOAP message to the InDesign Server indicating what
script to run (this is an ExtendScript script that sits on the
server), what template to load, and the variables you want to pass
to the script.
InDesign Server receives the SOAP request and runs a script that puts the variables into the template, generating graphic
files (these can be raster images like PNG or JPG, and/or PDF files
conforming to a joboptions file indicating high/low res, etc.). It
sends a response back to the PHP page indicating success.
Your PHP page renders the preview image or a link to the PDF output.
You can download a trial version of Adobe InDesign Server from adobe.com
You can find InDesign scripting information and InDesign Server information here:
http://www.adobe.com/devnet/indesign/sdk.html
You want the InDesign Server SDK and the InDesign Scripting SDK. Do not worry if these are "CS6" on the dev site but the server trial is CC, there has been almost no change to the product.

Play framework external dynamic HTML handling

I'm developing a web application on a Play framework 2.2.0 (Scala). The application is generally taking some input from the user, and then calls external module which in turn processes the input and generates html report. The report has a rather complex structure with html, javascript and json data, all put into different files. Then I wish to be able to render this report to the user by the Play framework, without him having to download report in an archive.
I tried to put these report files to some directory in the assets, and Redirect, but this won't work in production. Then I tried to use Ok.sendFile inline, but since content depends on other files the report does not render correctly.
I wonder if there is any "intended" way to render such dynamically generated HTML to the user?

create a dynamic html file and execute it in google apps script

I'm trying to migrate various Excel applications to Google Apps. These generate html and javaScript based on various excel data and parameters to create a local html file which is then opened by a browser.
I know it's a long shot, but can anyone think of a way to mimic this behavior in Google Apps Script? Namely - create a file on the client and fetch it up in a browser session.
Here's an example of the type of application I mean
You can use DocsListApp.createFile to create new HTML files on the user's Google Drive, but I don't believe you can serve the HTML from Drive directly. Alternatively you can use the SitesApp to create a new page on a Google Site with the HTML you want, using Site.addWebPage. Finally, you may want to look into the widgets available in UiApp or the UI Builder, to see if you can use those instead of custom HTML.
Just saw this:
https://googledrive.com/host/0B716ywBKT84AMXBENXlnYmJISlE/GoogleDriveHosting.html
HTML files uploaded to Public Google Drive folder are served as HTML, link is available through "Preview" button.
So far it doesn't work with Google Drive files simply moved to that folder but perhaps would work with files created there via createFile script.

Categories