1

I googling and have tried below ways to achieve this,

 1, mailto:
 2, Registrykeys  - @"HKEY_CLASSES_ROOT\mailto\shell\open\command", "", "none");
 3, proc.StartInfo.FileName = string.Format("\"{0}\"", Process.GetProcessesByName("OUTLOOK")[0].Modules[0].FileName);

But this always returns outlook window only. But I want to open default mail client window which is from our device like Google chrome, MAIL Live window,OUTLOOK

Attached Images for your reference.

enter image description here

Please share your answers,

Gokul Kumar
  • 389
  • 6
  • 16

1 Answers1

0

A mail client may or may not provide an API to send a mail with attachment but there is no standard way to open the default (or any) mail client with attachment.

That being said you can open the default mail client with a mailto uri :

    Uri myUri = new Uri("mailto:someone@example.com?Subject=Hello%20again&body=TEST");
    System.Diagnostics.Process.Start(myUri.AbsoluteUri);

You may try with other methods like MAPI or sending the mail yourself (SMTP) : C# MailTo with Attachment?

Community
  • 1
  • 1
Guillaume
  • 12,824
  • 3
  • 40
  • 48
  • Thanks for your update Guillaume, I am not able to use third Party DLL and sending mail and all, Because our requirement is need to open mail client window along with attachment. Please help me – Gokul Kumar Aug 26 '16 at 10:29