Unable to add variable of mailMessage type into Queue

orchestrator
studio

#1

I am unable to add variable of mailMessage type into Queue whereas i am able to add basic types like string and rows.

So I tried a workaround of converting the mailMessage into string by serializing using jsonConvert function and adding into queue. But when I deserialize and try to extract into mail format, it does’nt support. Has anyone faced this issue before or successfully added mails as queue items and processed pls share your solutions.

Thanks in advance!


#3

@Dharani_priya,

May I know the reason why you need to add the mail messages to Queue, instead of that you can save the mail messages in a folder and you can save each mail message path into the queue. This will help you to continue with processing queue items one by one. you have full track as well.


#4

Thanks @sarathi125 for the workaround.


#5

Since the MailMessage class isn’t natively serializable, you’d have to serialize it yourself. Another option is to extract the parts that you want from the MailMessage object (e.g., subject and body), then save those in the queue item.
Related: How to create Orchestrator Queues for emails in a mailbox?