and guess what that worked. However, this was only a prelude to what I actually wanted to do which was to get hMailServer to reply with my WAN address instead of using Dynamic DNS and this is what I came up with:
Dim lngStatus, objHTTP, objMatch, objRE, strText, strURL, strMyIP
' Return value in case the IP address could not be retrieved
strMyIP = "0.0.0.0"
' Retrieve the URL's text
strURL = "http://automation.whatismyip.com/n09230945.asp"
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
objHTTP.Open "GET", strURL
' Check if the result was valid, and if so return the result
If objHTTP.Status = 200 Then strMyIP = objHTTP.ResponseText
Set objHTTP = Nothing
Set oNewMessage = CreateObject("hMailServer.Message")
oNewMessage.From = "GetMyIP"
oNewMessage.FromAddress = "[email protected]
'oNewMessage.ReplyTo = oNewMessage.FromAddress
oNewMessage.Subject = strMyIP
oNewMessage.AddRecipient oMessage.From, oMessage.FromAddress
oNewMessage.Body = "http://" & strMyIP
set oNewMessage = Nothing