I want to make in my application sending E-mail by clicking from the menu. I use QDesktopServices. Follows the link, but mailto does not work. I write this:

QDesktopServices::openUrl(QUrl("mailto:receiver@outlook.com")); 

Tell me what's wrong?

  • A mail program may not be installed (outlook, the bat, etc.) that would pick up a link or the corresponding default program is not set up in the Windows settings. - evilnw

1 answer 1

It should work, the problem is probably somewhere in the system, try to enter

 mailto:receiver@outlook.com 

straight to the browser address bar

  • if I enter in the browser line, the Outlook mail opens, but from the application in any way. - Piop
  • and in the Application Output window (if qtcreator) does something swear at openUrl? - Pavel Gridin
  • is it linux I once met that on some combinations of Linux and Qt versions this happens, exactly on the mailto - Pavel Gridin