How do I popup the compose / create mail dialog using the user's default email client?

前端 未结 7 1657
攒了一身酷
攒了一身酷 2021-01-05 15:32

The use case is simple. At a certain point of time, I need to be able to show the user his familiar compose email dialog (Outlook or other) with

  • fields like f
相关标签:
7条回答
  • 2021-01-05 16:16

    You can create a process object and have it call "mailto:user@example.com?subject=My+New+Subject". This will cause the system to act on the mailto with its default handler, however, while you can set subjects and such this wont handle adding an attachment. I'll freely admit im not entirely sure how you'd go about forcing an attachment without writing some mail plugin.

    The process code is:

    System.Diagnostics.Process.Start("mailto:user@example.com?subject=My+New+Subject");
    
    0 讨论(0)
提交回复
热议问题