I have a scenario where I will be adding the mail message into Queues and from there I will be fetching it in the other process through Get transaction item
I am reading the mails through send smtp and using for loop , I am iterating and adding into the queue using add to queue Item and in collection type, I have mentioned as Mailmessgae
while I am retrieving using get transaction item, I am able to get it only as Object or string. How will I be able to use it as mail message ?
The problem is that currently the contents of queue items need to be [serializable into a JSON string ]and MailMessage is not, so extract all the information from mail and then add the items to the queue.
You wont be able to add mailmessage to Queue because it is not serializeable. what you can do is, you can extract informations like Body , Subject and put it on queue and can work on it.