Attaching file in Windows
Hi to all, i'd like to know if someone know how can i send an email with the default email client with attachement.
I've tryed this code:
QDesktopServices::openUrl(QUrl("mailto:?subject=Prova &body=bodybodybody &attach="+fileName));
Into the definition of fileName there's only 1 slash even if you'll see 4
Try following variations:
&attachment or &attachments instead of &attach. These are some variations I saw with quick googling. Also, original mailto rfc document doesn't have any notion of attachments. Those were added later as a part of MIME extentions.
It doesn't run.
If would be possible find another solution even mailto should be ok for me.
In thunderbird you can use the command line :
thunderbird -compose "to=asd@asd,subject=Prova,body=bodybodybody,attachment='file:///C:/logfile.log'"
stuk's tip was very helpful for me - thanks to stuk!