The DeliveryTime property specifies the time when the original e-mail was delivered to the recipient (MSMQMailRecipient).
Type: | Date |
Run time: | Read-write |
object.DeliveryTime
Syntax Element | Description |
Object | A recipient (MSMQMailRecipient) object that defines an e-mail recipient. |
The time when the original e-mail was delivered to the recipient.
DeliveryTime has a valid value only when the recipient is a member of the DeliveredRecipients property of a delivery report e-mail.
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, then 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 valid user address for each recipient, then 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
Add, Body, ComposeBody, ContentType, FormData, FormFields, MSMQMailEMail, MSMQMAILFormField, Name, ParseBody, Recipients, Subject, Text, TextMessageData, Value