[Qt-interest] Clean way of invoking the default email client using Qt (equivalent of clicking on a "mailto") ?
Manish Chakravarty
manishchaks at gmail.com
Thu Nov 26 12:02:47 CET 2009
Hey guys,
I figured out the
QDesktopServices::openUrl(QUrl("mailto:someone at example.com?body=Something+you+want+to+send"));
thing.
But there is further problem; I cannot use it to send HTML emails or emails
with attachements.
Thus it is unsuitable for my purpose.
Thanks for you time!
-- Manish Chakravarty
On Thu, Nov 19, 2009 at 11:21 PM, KC Jones <kc at asperasoft.com> wrote:
> Using mailto: urls is your best bet. You can specify a message body
> that way. The syntax is described in great detail at the IETF site
> here: http://www.ietf.org/rfc/rfc2368.txt
>
> There may be some risk of having the system reject or mangle your url
> request due to spam filters. Not too sure about all that...
>
> On Thu, Nov 19, 2009 at 4:58 AM, Manish Chakravarty
> <manishchaks at gmail.com> wrote:
> > Hello All,
> > I have a QTextEdit class with some HTML in it.
> > I want my Qt application to do the following , given an email address.
> > - Launch the default email client
> > - Populate the "To" filed with the email address
> > - Leave the subject line empty
> > - Populate the body of the email with the HTML inside the QTextEdit.
> > I know webpages do (1) & (2) mentioned above using "mailto" links.
> > Wondering how to get the equivalent behavior with Qt 4.5
> > Thanks in advance!
> > --
> > Manish Chakravarty
> > Blog: http://manish-chaks.livejournal.com/
> > LinkedIn: http://www.linkedin.com/in/manishchakravarty
> > Twitter: http://twitter.com/ManishChaks
> > Facebook: http://www.facebook.com/manish.chakravarty
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> >
>
--
Manish Chakravarty
Blog: http://manish-chaks.livejournal.com/
LinkedIn: http://www.linkedin.com/in/manishchakravarty
Twitter: http://twitter.com/ManishChaks
Facebook: http://www.facebook.com/manish.chakravarty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091126/fa79907d/attachment.html
More information about the Qt-interest-old
mailing list