<p>How do I make it so <code>mailto:</code> links will be registered with my program?</p>
<p>How would I then handle that event in my program?</p>
<p>Most of the solutions I found from a quick Google search are how to do this manually, but I need to do this automatically for users of my program if they click a button, such as &quot;set as default email client&quot;.</p>
<p>#Edit:
Removed reference to Delphi, because the answer is independent of your language.</p>

From what I've seen, there are a few registry keys that set the default mail client. One of them is:
System Key:
```
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
```
Value Name:
```
(Default)
```
Data Type:
```
REG_SZ
```
(String Value)
Value Data:
```
Mail program command-line
```
.
I'm not familiar  with
```
Delphi 7
```
, but I'm sure there are some
registry editing libraries
there that you could use to modify this value.
Some places list more than this
key
, others just this key, so you may need to test a little bit to find the proper one(s).