Forward EMail Activity

Hi,
I’m using Forward Email activity for forwarding an Email. The Input for Forward Email activity accepts only “Office365 Message” datatype. It doesn’t accept "MailMessage as an input. I need to convert MailMessage to Office365 Message before using Forward Email activity .

I tried Ctype and Cast functions. It doesn’t work. Can someone help on this.

directcast(mailmessage,target Method)

It throws an error
‘)’ expected

@besakkiappan46

there are multiple forward email activities…please use as per what activity you need…one is for office365 you have one for others as well

https://docs.uipath.com/activities/other/latest/productivity/forward-mail-x

this does not need the input as office365message

Hope this helps

cheers

I did tried this. I’m using Get Outlook Messages to get list of mailMessages. After which I’m using For each loop, Inside which I use “Forward Email”. I get an error " Forward Email: The provided MailMessage does not reference a known email service".

Anyother option?

@besakkiappan46

Can you please try for each email activity and then inside that use the forward email…also in the for each email activity you can pass the output of get outlook mail messages

Alternately in send outlook mail messages activity you have a forward message option as well…you can use that too

cheers

It throws the same exception. I have explored on this earlier as well. It doesn’t accept “get Outlook Mail Messages” activity’s Output as its Input.
We can do away with get Outlook Mail Messages and use “For each Email” alone to get the mails and use “Forward Email” inside it. It works that way.
But in my case, I get my Emails (As a list of mailmessages) in a different Xaml. I don’t want to disturb them.

Any other suggestions?

@besakkiappan46

Did you try with send outlook mail message with forward option?

cheers

It does sends the Email but not as a “Forward” . We won’t see “FW” in the mail subject. we’ll have to hardcode them in the code.