OriginalSubmissionTime
MSMQMailDeliveryReportData

The OriginalSubmissionTime property specifies the submission time of the original e-mail in a delivery report e-mail.

Type: Date
Run time: Read-write

Syntax

object1.object2.OriginalSubmissionTime
 
Syntax Element Description
Object1 E-mail (MSMQMailEMail) object that defines the e-mail report.
Object2 Delivery report data (MSMQMailDeliveryReportData) object that represents the delivery report information.

Settings

Date representation of the original e-mail message's submission time.

Remarks

OriginalSubmissionTime should be set to the SubmissionTime property of the original e-mail.

Example

This example defines a delivery report, adding two delivered recipients to the delivered recipient list of the report. The e-mail object is composed into a mail message, and each delivered recipient is displayed.

To try this example using Microsoft® Visual Basic® (version 5.0), paste the code into the Code window of a form, enter a valid user address for each recipient, run the example, and click the form.

Dim email As New MSMQMailEMail
Dim msg As New MSMQMessage

Private Sub Form_Click()

   '*********************
   '*  Define e-mail
   '*********************

   'Set e-mail type to delivery report.
   email.ContentType = MSMQMAIL_EMAIL_DELIVERY_REPORT

   'Add the Recipient of the report (usually the original e-mail sender).
   email.Recipients.Add "Exchange_User", "UserAlias@ServerInputQueueLabel", MSMQMAIL_RECIPIENT_TO

   'Set subject of original mail.
   email.DeliveryReportData.OriginalSubject = "Original subject "
   
   'Set submission time of original mail.
   email.DeliveryReportData.OriginalSubmissionTime = CDate("5/20/94 10:16:07 PM")

  'Add two delivered recipients.
   email.DeliveryReportData.DeliveredRecipients.Add "Exchange_User2", "UserAlias2@ServerInputQueueLabel", MSMQMAIL_RECIPIENT_TO, DeliveryTime:= CDate("5/20/94 10:17:00 PM")
email.DeliveryReportData.DeliveredRecipients.Add "Exchange_User3", "UserAlias3@ServerInputQueueLabel", MSMQMAIL_RECIPIENT_CC, DeliveryTime:= CDate("5/20/94 11:01:00 PM")
 
   'Compose message Body
   msg.Body = email.ComposeBody


   '*********************
   '* Display Delivered Recipients.
   '*********************

   Dim recipient As MSMQMailRecipient

   For Each recipient In email.DeliveryReportData.DeliveredRecipients
       MsgBox "Delivered To Recipient: " + recipient.Name + " at " + recipient.Address + " on " + recipient.DeliveryTime
   Next recipient

End Sub
 

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Import Library: Included as a resource in mqmailoa.dll.
  Unicode: Defined only as Unicode.

See Also

Add, Address, Body, ComposeBody, ContentType, MSMQMailEMail, MSMQMessage, Name, Recipients, Sender, Text, TextMessageData