File attachment by QDesktopServices::openUrl
samdol last edited by samdol
I tried to call my email client to attach a picture file by
QString filePath ="c:/myf/aft.jpg" QDesktopServices::openUrl(QUrl("mailto:?subject=test&body=test&attachment;=" + filePath));
It calls my mail client program, but it did not attached the file.
I tried both windows and linux. Is this a bug or do I have to do something else?
the_ last edited by
mailto:does not allow this by definition.
VRonin last edited by
Only a minority of clients allow attachments via a
mailto:link as it's a potential security vulnerability. You have to rely on the client's own API to include attachments to email and there is nothing Qt can do about it