I have the following code
Public Sub StartDefaultMai l( _
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 ProcessStartInf o
psi.UseShellExe cute = True
psi.FileName = _
"mailto:" & HttpUtility.Url Encode([To]) & _
"?subject=" & HttpUtility.Url Encode(Subject) & _
"&body=" & HttpUtility.Url Encode(Message)
Process.Start(p si)
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 StartDefaultMai l( _
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 ProcessStartInf o
psi.UseShellExe cute = True
psi.FileName = _
"mailto:" & HttpUtility.Url Encode([To]) & _
"?subject=" & HttpUtility.Url Encode(Subject) & _
"&body=" & HttpUtility.Url Encode(Message)
Process.Start(p si)
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
Comment