Hi Steve,
When I was first experimenting with that little routine, I discovered the
problem with ':', '?' and '&' (space wasn't a problem - just the delimiters).
My first thought was to use UrlEncode but when I tried it, it didn't work and
I just got a url-encoded strings in my email.
Now you're saying that url-encoding could be a solution but you haven't
tested it!
Well, I could say all the above and leave it at that - but, no, I can't. I
have to prove it. So I did it again and it worked perfectly! I must have done
something wrong the first time round.
So, thanks, and yes, url-encoding <is> the way to go.
Regards,
Fergus
<code>
'A reference to System.Web may be necessary
'in the Project for this Import to work.
Imports System.Web.HttpUtility
Public Sub StartDefaultMail (sTo As String, _
Optional sSubject As String = "", _
Optional sMessage As String = "")
Try
sTo = UrlEncode (sTo)
sSubject = UrlEncode (sSubject)
sMessage = UrlEncode (sMessage)
Process.Start ("mailto:" & sTo & "?subject=" _
& sSubject & "&body=" & sMessage)
Catch e As Exception
MsgBox ("Couldn't start default email application" _
& vbCrLf & e.Message)
'or
Throw New Exception ("Couldn't start default email application",
e)
End Try
End Sub
</code>