Modify

Opened 16 years ago

Closed 16 years ago

#1644 closed Bug (Fixed)

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

Reported by: Emiel Wieldraaijer Owned by: J-Paul Mesnage
Milestone: 3.3.7.0 Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: _InetMail Live Mail Default Cc:

Description

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', "")
	Else
		Local $var = RegRead($HKCR & '\mailto\shell\open\command', "")
	EndIf
	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 by J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [5848] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.