I regularly send emails and attachments using XOJO. Can the email be ‘saved as a message’ to create a physical file?
For example, in most email programs (WINDOWS) you can drag an email from inside them, drop it on the desktop and it is a standalone ‘message’ file complete with attachments. Double-click it and it opens the email in the host email program.
I regularly save and drag these emails to a membership system I have developed, a record is created in the database and a link to the actual file path within the ‘document storage’ is created once the files is copied there after drag and drop.
I now want to do the same with emails which I send direct from within the XOJO system using a template system linked to the database instead of using the external email program.
Just look the standar for the file format you need and make an app that can write the file using that specification. Most common file must be the EML file.
If OTOH you want to save as text, you probably want the mboxrd format. When an email is sent over the wire, it will be in something close to mboxrd format.