The OriginalSubject property specifies the subject of the original e-mail in a delivery report e-mail.
Type: | String |
Run time: | Read-write |
Object1.Object2.OriginalSubject
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. |
String representation of the original e-mail message's subject.
OriginalSubject should be set to the subject of the original 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, Address, Body, ComposeBody, ContentType, MSMQMailEMail, MSMQMessage, Name, Recipients, Sender, Text, TextMessageData