![]() |
[Solved] How to open default email client with attachment
I know similar question is asked like thousand times, but I couldn't find clear answer. So, is there a way how to open default email client with to send email with attachment? I mean, something like "QDesktopServices::openUrl(QUrl("mailto:?subject=T est"));" but I need attach a file and adding "attach" or "attachment" is not standard way to use "mailto" and it does not work on N900 maemo default email client.
I know about possibility write own client connecting to SMTP server, but I would love to avoid it... |
Re: How to open default email client with attachment
I dont know if I understand what you are trying to do but if i got it right you can use filebox. You can select the file or files you need then hold for along press, choose share, and modests opens to a blank email with all the attachments there.
to select multiple files you have to enable select multiple files by going into filebox's settings |
Re: How to open default email client with attachment
I apologize I didn't give exact information.
I'm working on some application (language is C++, mainly in Qt library) which generates some files (usually hidden from user) and we want to give the user possibility to send it. I already implement sending by bluetooth and now we want email; user will select item in our app and from menu select "send via email" and there we want to default email client to appear (pop up) composing new email with a file in attachment. User will set receiver and can write message and send it. That's my problem. EDIT: To give example, I would like to do something like this: Code:
#include <QDesktopServices> Code:
#include <QMessage> |
Re: How to open default email client with attachment
Oh well, I finally found some solution. When I call QMessageService::compose if attachment was set, body and attachment is missing. But if I save the message (email) first, it will be saved with both body and attachment and QMessage instance will be actualized (contain id now) and when I use QMessageService::show, email with all data will be opened. At this point, I can delete saved mail.
|
All times are GMT. The time now is 09:35. |
vBulletin® Version 3.8.8