Message-ID and ReplyToMessageID

Question:
Reading through the documentation I don’t see access to the Message-ID.

1. Is it possible to set the Message-ID to string value? ( like a GUID string value )

2. After a read-confirmation/reply, is there a property to access the ‘ReplyToMessageId’ value?

Answer:

The GetHeaderField and AddHeaderField methods may be used to set or access any header field.  The Message-ID field is somewhat special:

To set the Message-ID header, call emailObject.AddHeaderField(“Message-ID”,”newValue”).  Also, be sure to set the mailman.AutoGenMessageId property = false. Chilkat automatically generates a new message ID with each email to prevent SMTP servers from dropping emails mistaken as duplicates. What happened in the past was that Chilkat customers would re-use the same email object without changing the Message-ID. The first email is sent OK, but subsequent emails are not because the SMTP server perceives them to be duplicates because of identical message IDs.

The ReplyToMessageID field may be set by calling AddHeaderField(“ReplyToMessageID”,”something…”)

Tags :