Message Property
Specifies Message object to be sent by
MailBee.SMTP component.
By default, when MailBee.SMTP is instantiated it also creates empty Message
object accessible via Message property. However, you can always set Message
property to another Message object (for example, the one created by MailBee.POP3
component). Thus you can easily organize message forwarding.
SMTP component has shortcut methods and properties to quickly access
composing-oriented methods and properties of contained Message object.
For example, SMTP.BodyEncoding is a synonym for SMTP.Message.BodyEncoding.
Value Type: | MailBee.Message | |
Parameters: | None |
Usage example:
'Forwarding with MailBee Dim objPOP3, objSMTP, Msg 'Using visual basic to create object Set objPOP3 = CreateObject("MailBee.POP3") Set objSMTP = CreateObject("MailBee.SMTP") 'Using ASP to create object 'Set objPOP3 = Server.CreateObject("MailBee.POP3") 'Set objSMTP = Server.CreateObject("MailBee.SMTP") 'In ASP use Response.Write instead of MsgBox objPOP3.LicenseKey = "put your POP3 license key here" objSMTP.LicenseKey = "put your SMTP license key here" objPOP3.Connect "mailserver.com", 110, "MyName", "MyPassword" If objPOP3.Connected Then If objPOP3.MessageCount > 0 Then Set Msg = objPOP3.RetrieveSingleMessage(1) If Not Msg Is Nothing Then Msg.ToAddr = "bill@host.com" Msg.CCAddr = "" ' Do not send to original CC's Msg.Subject = "FW: " & Msg.Subject objSMTP.ServerName = "mail.server.com" If objSMTP.Connect Then Set objSMTP.Message = Msg objSMTP.Send objSMTP.Disconnect End If End If End If objPOP3.Disconnect End If
See Also:
SMTP Object
POP3 Object
Message Object
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.