Assign MailMessage from TransactionItem

Hi guys,

In get transaction I get some data from mailbox and wrap it all up in DataRow in TransactionItem.
One of columns is set to be System.Net.Mail.MailMessage. In another workflow I want to ‘unpack’ it by assigning it to variable of type System.Net.Mail.MailMessage just to process it further. I get error that Strict On disallows implicit conversion from ‘Object’ to ‘MailMessage’.
Do you have any idea how to tackle that? i don’t want to change TransactionItem data type in every place, I want to keep it as DataRow.

Thanks in advance!

hi @BobbyDropTable

while uploading the item to queue you may need to define the exact type of the items which you want to upload (like below )

may be it helps to resolve the issue.



In Get Transaction item, while you are extracting data from mailbox, are you creating the datarow with System.Net.Mail.MailMessage type?


Big thanks for your help.

@sarathi125 - TransactionItem was of type DataRow and one column to store mail message was of type System.Net.Mail.Message.

I tried to avoid that but I just changed TransactionItem from DataRow to Mail Message in whole project (turned out it was not that much work). I could do that since I don’t use Orchestrator in that project.