VB Code:
  1. Private Declare Function RegCloseKey Lib "advapi32.dll" ( _
  2.     ByVal hKey As Long _
  3. ) As Long
  4.  
  5. Private Declare Function RegOpenKeyEx _
  6.  Lib "advapi32.dll" Alias "RegOpenKeyExA" ( _
  7.     ByVal hKey As Long, _
  8.     ByVal lpSubKey As String, _
  9.     ByVal ulOptions As Long, _
  10.     ByVal samDesired As Long, _
  11.     ByRef phkResult As Long _
  12. ) As Long
  13.  
  14. Private Declare Function RegQueryValueEx _
  15.  Lib "advapi32.dll" Alias "RegQueryValueExA" ( _
  16.     ByVal hKey As Long, _
  17.     ByVal lpValueName As String, _
  18.     ByVal lpReserved As Long, _
  19.     ByRef lpType As Long, _
  20.     ByRef lpData As Any, _
  21.     ByRef lpcbData As Long _
  22. ) As Long
  23.  
  24. Private Const HKEY_CLASSES_ROOT As Long = &H80000000
  25. Private Const REG_SZ As Long = 1
  26. Private Const KEY_QUERY_VALUE = &H1
  27. Private Const KEY_SET_VALUE = &H2
  28. Private Const KEY_CREATE_SUB_KEY = &H4
  29. Private Const KEY_ENUMERATE_SUB_KEYS = &H8
  30. Private Const KEY_NOTIFY = &H10
  31. Private Const KEY_CREATE_LINK = &H20
  32. Private Const STANDARD_RIGHTS_ALL = &H1F0000
  33. Private Const SYNCHRONIZE = &H100000
  34. Private Const ERROR_SUCCESS As Long = 0&
  35. Private Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or _
  36.     KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS _
  37.     Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))
  38.    
  39. Public Function DefaultMail() As String
  40.     Dim hKey As Long
  41.     Dim sRetVal As String
  42.     Const MAX_PATH = 260&
  43.     If RegOpenKeyEx(HKEY_CLASSES_ROOT, "\mailto\shell\open\command\", _
  44.      0, KEY_ALL_ACCESS, hKey) = ERROR_SUCCESS Then
  45.         sRetVal = String(MAX_PATH + 1, vbNullChar)
  46.         If RegQueryValueEx(hKey, vbNullString, 0&, REG_SZ, _
  47.          ByVal sRetVal, MAX_PATH + 1) = ERROR_SUCCESS Then
  48.             DefaultMail = Left$(sRetVal, InStr(sRetVal, vbNullChar) - 1)
  49.         End If
  50.         Call RegCloseKey(hKey)
  51.     End If
  52. End Function
You have to parse the return value of the DefaultMail function since it will return the path to the mail client including information on how to open it to mail someone... Just run it and you'll see what you need to do.