Attaching file in Windows
-
wrote on 23 Sept 2010, 23:43 last edited by
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:
@
QString fileName="C:\myfile.png";
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
Thanks.
-
wrote on 24 Sept 2010, 01:04 last edited by
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.
-
wrote on 24 Sept 2010, 01:38 last edited by
It doesn't run.
If would be possible find another solution even mailto should be ok for me.
-
wrote on 24 Sept 2010, 07:08 last edited by
In thunderbird you can use the command line :
thunderbird -compose "to=asd@asd,subject=Prova,body=bodybodybody,attachment='file:///C:/logfile.log'"
"Link...":http://kb.mozillazine.org/Command_line_arguments_(Thunderbird)
-
wrote on 16 Apr 2013, 14:54 last edited by
stuk's tip was very helpful for me - thanks to stuk!