Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57816

Windows 10: QDesktopServices::openUrl with mailto-URL no longer opens window to select program which should be used to open file nor returns error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.9
    • 5.7.0
    • QPA: Windows
    • None
    • OS: Windows 10
    • b07a06745eb79057ccc08bc908b2df866bc38ac0 (qtbase/5.9, 22.3.2017, 5.9)

      On Windows 10 when I try to send email like QDesktopServices::openUrl(QUrl("mailto:?to=example@gmail.com&subject=Subject&body=Body", QUrl::TolerantMode)) Qt does nothing until I install email client and returns true. If in system installed any email client it will be opened.
      Also tested on Windows 8, and if there are no any email clients it will open standard window which program should be used(Select program.png). And print debug output: "Cannot launch 'mailto:?to=example@gmail.com&subject=Subject&body=Body': There is no mail program installed."

      5.7.0 Windows 10
      HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\mailto\UserChoice Progid=""
      HKEY_CLASSES_ROOT\mailto\shell\open Command/.=""C:\WINDOWS\system32\rundll32.exe" "C:\WINDOWS\system32\url.dll",MailToProtocolHandler %l"
      
      url=QUrl( mailto : ?to=example@gmail.com&subject=Subject&body=Body ), valid=true
      
      ok= true
      
      5.4.2 Windows 8
      HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\
      mailto\UserChoice Progid=""
      HKEY_CLASSES_ROOT\mailto\shell\open Command/.=""
      
      url=QUrl(mailto : ?to=example@gmail.com&subject=Subject&body=Body) , valid= true
      
      Cannot launch 'mailto:?to=example@gmail.com&subject=Subject&body=Body': There is
      no mail program installed.
      ok= true
      

        1. Win 8 output.png
          Win 8 output.png
          92 kB
        2. untitled.7z
          3 kB
        3. Select program.png
          Select program.png
          8 kB
        4. qtbug57816.zip
          2 kB
        5. qtbug57816_process_launcher.zip
          2 kB
        6. qtbug57816_diag.diff
          2 kB
        7. Open with.png
          Open with.png
          181 kB
        8. Mail app.png
          Mail app.png
          11 kB
        9. default apps.png
          default apps.png
          41 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            khalupa.roman Roman khalupa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes