I need my locally-installed, thick-client application (Qt / C++) to generate a ready-to-be-sent email message on the client's machine:
- This message must contain the contents of a relatively small (15K - 200K) binary file.
- Many of my users will be disconnected at the time this message is generated, so it is possible the email will need to sit in the outbox until a later time.
- This application will run on Windows, Mac OS X, and various Linux distros (official support for Ubuntu/Debian and Fedora), and there is no requirement that specific email clients need to be installed.
I have already tried:
- Opening a
mailto:
link usingQDesktopServices::openUrl()
with theattach
(orattachment
) parameter. But those parameters are not officially part of the protocol, and some clients (notably Outlook) ignore them. - Encoding the file using Base64 and adding it as part of the
body
parameter of amailto:
link. But the length of themailto
link is truncated by some email clients (again, notably Outlook) so this will not work.
Google Picasa achieves this (at least, on Windows; haven't checked other OS's) when you send pictures from within the application. It creates a message with the attachments and some pre-filled text. You can then edit the message and send at your convenience. Any ideas how they are doing this?