Mails generally can be saved in different file formats, but almost all programs can open files in the eml-format, which is described here
https://en.wikipedia.org/wiki/Email#Filename_extensions.
It's basically the raw email as it was sent over the network.
I'm not sure what emails you want to open, are these mails that have been received via the internet or do you want to create new emails to be sent by the user?
In the first case you could save the raw data into a field and just save that into in a file on the users machine and open the file if you are on ngdesktop
- Code: Select all
if (application.getApplicationType() == APPLICATION_TYPES.NG_CLIENT && plugins.ngdesktoputils.isNGDesktop()) {
[...]
plugins.ngdesktopfile.writeFile(targetFileName, bytes);
if (targetFileName) {
plugins.ngdesktopfile.openFile(targetFileName);
}
} else {
if (mimeType) {
success = plugins.file.writeFile(dateiName, bytes, mimeType);
} else {
success = plugins.file.writeFile(dateiName, bytes);
}
[...]
}
If you want to prepare a mail to be sent, I'm not sure if you can just create a file to be sent. We create a new message in the draft-folder of the users mail-account to do that, and the user can then take over in his mailclient of choice.
We use the mailpro-plugin from
http://www.servoy-plugins.de/ to handle the imap-stuff, if you want to go the Office365-route and use graph you can also save drafts that the user can send then.
And yes all this works on mac and on windows.