Unable to add mail mesages to queue

Im trying to read emails using exchange and add them to queue item. But the queue item is displaying null.

Hi @Sai_deepthi ,

I believe we cannot add some datatypes as arguments in Add Queue Item Activity.

You could Check the below Documentation for more info :

You can’t add complex datatypes to a queue. Only simple datatypes like string, int, and datetime.


You cannot add the mail variable (System.Mail.MailMessage) to the queue as it is.

In order to achieve this, you have to add parts of the email into the transactionItem individually, as strings.

So, instead of trying to add the mail variable directly, add the Subject as a String, then the ‘To’ field, the ‘Cc’ and the ‘Body’. If the mail contains attachments, then save them locally and then upload the path to the attachment as string as another entry in the transactionItem.

Good luck!


I tried assigning the body to a string variable and add it to queue…but still I’m unable to. Can u please help me with sample work flow

I’ve created this simple workflow which demonstrates how a mail message should be added to the queue. Check the ‘ItemInformation’ property of the ‘Add Queue Item’ activity.
Keep in mind that the variable type of the ‘mail’ variable is System.Net.Mail.MailMessage

Hope this helps!

UploadMailToQueue.zip (2.1 KB)

1 Like

Thank you. It worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.