J
Jack Russell
I have the following code
Public Sub StartDefaultMail( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
'To use this code you need to add a reference to System.web!!!
Try
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = _
"mailto:" & HttpUtility.UrlEncode([To]) & _
"?subject=" & HttpUtility.UrlEncode(Subject) & _
"&body=" & HttpUtility.UrlEncode(Message)
Process.Start(psi)
Catch ex As Exception
Throw _
New Exception( _
"Default mail client could not be started.", _
ex _
)
End Try
End Sub
I am sure this workewd under VB 2003/ .net framework 1.1 but it throws
an error
"the ordinal 36 could not be located in the dynamic link library
MAPI32.dll."
I have googling etc with no success.
Thanks
Jack Russell
Public Sub StartDefaultMail( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
'To use this code you need to add a reference to System.web!!!
Try
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = _
"mailto:" & HttpUtility.UrlEncode([To]) & _
"?subject=" & HttpUtility.UrlEncode(Subject) & _
"&body=" & HttpUtility.UrlEncode(Message)
Process.Start(psi)
Catch ex As Exception
Throw _
New Exception( _
"Default mail client could not be started.", _
ex _
)
End Try
End Sub
I am sure this workewd under VB 2003/ .net framework 1.1 but it throws
an error
"the ordinal 36 could not be located in the dynamic link library
MAPI32.dll."
I have googling etc with no success.
Thanks
Jack Russell