Opened 14 years ago

Closed 14 years ago

#1644 closed Bug (Fixed)

_InetMail function does not work when Windows Live mail is default client

Reported by: Emiel Wieldraaijer Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: _InetMail Live Mail Default Cc:


The function _InetMail needs some improvements

Install Outlook 2007 and Windows Live Mail, make Windows Live Mail the default client.

If i take a look at the function _InetMail i see the line RegRead('HKCR\mailto\shell\open\command', "") This retrieves information about Outlook 2007 (in my case) but if i check RegRead('HKCU\Software\Clients\Mail', "") which retrieves the current user default email client i see that Windows Live Mail is default.

So when you use the function it will open outlook instead of Windows Live Mail

I changed the code to add support for Windows Live Mail (see below) but maybe there is a better way..

Func _INetMail($s_MailTo, $s_MailSubject, $s_MailBody)
	Local $prev = Opt("ExpandEnvStrings", 1)
	Local $dflt = RegRead($HKCU & '\Software\Clients\Mail', "")

	If $dflt = "Windows Live Mail" Then
		Local $var = RegRead($HKCR & '\WLMail.Url.Mailto\Shell\open\command', "")
		Local $var = RegRead($HKCR & '\mailto\shell\open\command', "")
	Local $ret = Run(StringReplace($var, '%1', _INetExplorerCapable('mailto:' & $s_MailTo & '?subject=' & $s_MailSubject & '&body=' & $s_MailBody)))
	Opt("ExpandEnvStrings", $prev)
	Return $ret
EndFunc   ;==>_INetMail

Attachments (0)

Change History (1)

comment:1 Changed 14 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5848] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.