A mailto request opens an empty Chrome window



  • Hi.
    I want that a button opens an email client or a browser to send an email to certain email. I've written this slot function:
    @void MainWindow::on_actionFeedback_triggered()
    {
    QDesktopServices::openUrl(QUrl("mailto:danifujii@gmail.com?subject=THeM"));
    }
    @
    The thing is, it opens an empty Chrome window (as i don't have an email client set). But I know from other sites and apps that it is posible to use mail to for browsers.
    Thanks.


  • Moderators

    and what do you expect to happen when you don't have a mail client installed?



  • [quote author="raven-worx" date="1422458555"]and what do you expect to happen when you don't have a mail client installed?[/quote]

    I want Gmail or Hotmail to open. Cannot find the code for it.
    Or do it that if there is no client, THEN open Gmail.


  • Moderators

    It works in browsers because they intercept the mailto link and forward you to another site instead opening the local installed mail client.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.