MinimalRebuild Property


MinimalRebuild property restricts possible modifications of the message to operations with its headers.

Setting this property to True ensures that the structure and values of the header fields of the message (for example, "Message-ID") and its content will keep their original values. The only allowed modifications of the message are changing, removing or adding of the headers.

Set this property to True during forwarding of the message or when you send the message which is imported from the file.

Default value is False.


Value Type: Boolean
Parameters: None 

Usage example:

' This sample retrieves first message in the account, sets 'MinimalRebuild' property to True and adds a header.
' Then, it sends the modified message back to the server. The message has kept its original structure and the new header was
' the only change.
Dim MailerPOP, MailerSMTP, Msg
' Using visual basic to create object
Set MailerPOP = CreateObject("MailBee.POP3")
Set MailerSMTP = CreateObject("MailBee.SMTP")
' Using ASP to create object
' Set MailerPOP = Server.CreateObject("MailBee.POP3")
' Set MailerSMTP = Server.CreateObject("MailBee.SMTP")
' In ASP use Response.Write instead of MsgBox
MailerPOP.LicenseKey = "put your license key"
MailerSMTP.LicenseKey = "put your license key"
MailerSMTP.ServerName = "mailserver.com"
If MailerPOP.Connect("mailserver.com", 110, "MyName", "MyPassword") Then
   If MailerPOP.MessageCount > 0 Then
      Set Msg = MailerPOP.RetrieveSingleMessage(1)
      If Not Msg Is Nothing Then
         Msg.MinimalRebuild = True
         Msg.AddHeader "Organization", "AfterLogic Corp"
         Set MailerSMTP.Message = Msg

         ' Send modified message back to the server
         If Not MailerSMTP.Send Then
            MsgBox "Error #" & MailerSMTP.ErrCode & ", " & MailerSMTP.ErrDesc
         Else
            MailerSMTP.Disconnect
         End If
      End If
   Else
      MsgBox "Your mailbox is empty."
   End If
   MailerPOP.Disconnect
End If

See Also:

Message Object | POP3 Object | SMTP Object


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.