How to get messages contained in Message or IBodypart objects using CDO?

Please find the VBScript code-snippet to get or extract the messages that are contained in the other objects like Message or IBodyPart.   1: ‘ Please provide the value for sVal 2: Function getMsg(sVal As IBodyPart) As Message 3: Dim Msg 4: Set Msg = CreateObject("CDO.Message") 5: Dim getVal 6: Set getVal = Msg.DataSource 7:…

How to Manually adding Attachments using CDO?

Please find this useful article which describes “how to manually adding attachments”.   This can be possible through Message object either through IMessage.Attachments or IBodyPart.BodyParts collection.Note: This approach is useful if you have content that is not on the file system or URL-addressable.   This article has code snippets in Visual Basic, C++, VBScript.