Hi Cor,
In the message where I said I think it's not possible, I had a ROFL.
That's because I've written two long posts describing how Url Protocols
(including mailto
work I've also posted so many snippets that send mail
using mailto: that I've lost count.
So I was being very tongue-in-cheek when I said it couldn't be done.
;-)
The routine below will put a message into the email program but not do the
actual send. This is left to the User, after they've done any editing that
they might want to do.
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 app", e)
End Try
End Sub
</code>