Load email from a *.EML file to raw_Content property and send it with 100% original format.
[Syntax] Visual C++: HRESULT LoadRawMessage(BSTR FileName, LONG Flag, long* pVal) Visual Basic: LoadRawMessage(FileName As String, LONG Flag) As Long
Parameters
Return Value
Remarks
Example
[VB6, VBA - Forward EML File] Const ConnectNormal = 0 Const ConnectSSLAuto = 1 Const ConnectSTARTTLS = 2 Const ConnectDirectSSL = 3 Const ConnectTryTLS = 4 Dim oSmtp As EASendMailObjLib.Mail Set oSmtp = New EASendMailObjLib.Mail ' for evaluation usage, please use "TryIt" as the license code. oSmtp.LicenseCode = "TryIt" ' Your SMTP server address oSmtp.ServerAddr = "smtp.emailarchitect.net" ' User and password for ESMTP authentication oSmtp.UserName = "test@emailarchitect.net" oSmtp.Password = "testpassword" ' ConnectTryTLS means if server supports SSL/TLS connection, SSL/TLS is used automatically oSmtp.ConnectType = ConnectTryTLS ' load this email from file. oSmtp.LoadRawMessage "c:\my folder\test.eml", 1 ' send the email with 100% original format. If oSmtp.SendMail() = 0 Then MsgBox "Message delivered!" Else MsgBox oSmtp.GetLastErrDescription() End If oSmtp.raw_Content = ""
See Also