Save current email to specified email file.
[Syntax] Visual C++: HRESULT SaveMail( BSTR strFile, long* pVal ) Visual Basic: SaveMail( strFile As String ) As Long
strFile
File name of the saved file.
Return Values
If this method succeeds, the return value is zero; otherwise, the return value is non-zero.
If specified file name exists, this method will overwrite the existing file.
Usage Example:
[Visual Basic]
Private Sub SaveEmail()
Dim oSmtp As New EASendMailObjLib.Mail
oSmtp.LicenseCode = "TryIt"
oSmtp.Subject = "test"
oSmtp.BodyText = "this is body"
If oSmtp.SaveMail( "c:\test.eml" ) = 0 Then
MsgBox "Email saved!"
Else
MsgBox "Save email failed!"
MsgBox oSmtp.GetLastErrDescription()
End If
End Sub
See Also