Reputation: 265
I'm trying to create a program where if you click an email in a web browser (or somewhere else) my program starts with information about the recipient. I can't figure out how to do this.
I've tried googling and looking up the documentation. I can't find a solution.
public EmailGenerator(string emailClicked)
{
mailTo = emailClicked;
mailCC = Clipboard.GetText();
}
I want to be able to click an email and my program will start and have access to the link you clicked on. Setting my program as the default program for emailing.
My question is not how to set the standard mail app, but how to get the data once I have done so.
Upvotes: 0
Views: 167
Reputation: 6749
The simplest option, that I know of, is to set the registry key yourself HKEY_CLASSES_ROOT\mailto\shell\open\command
.
You'll need to research this registry, and related, in order to configure it properly.
Personally I explore the registry to see if there is a list of options there also and if so add my own to the list so that users can choose which will be default.
Upvotes: 3