How to reply to a mail in outlook

I’m trying to reply to users with particular subject lines. While replying to them I want to quote the body of the mail recived by me. To achieve that I tried the below method:

Reply main.xaml (5.6 KB)

In the above solution, I have tried copying the mail.body of the sender into a string variable and then concatenate it to my body of the email (in Send Outlook mail Activity). But unfortunately, the formatting (in my case tables) of the sender’s mail body is getting lost and sent mail just doesn’t make sense.

Please guide me to reach the required solution in order to retain the table(s) and the other formatting inside the sender’s mail.

Thank you.

Did you try this?

I tried but it’s not working. The whole table is converted into a paragraph and mailed to the recipient.

1)You can try Forward option in Send Outlook Email without entering subject and body fields(if this meets your requirement)

2)There is a property mailmessage.replytolist …not sure how it works in Uipath, try to do some research.

Hello vvaidya !! This is what I found !

Use the ReplyToList property to indicate the list of addresses other than the From address to use to reply to this message.The ReplyToList property replaces the ReplyTo property that only allows a single address to reply to.

https://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.replytolist(v=vs.110).aspx

I don’t think it is what we are looking for. And for 1’st point, No I need to add reply body quoting the previous message received by me.
Thanks for suggestions, Can we think of something else? :slight_smile:

How about sending previous email as Attachment ? Will that work for you?

I was thinking on the same line, but more like the screenshot of previous mail. The challenge will be to get the only body part of the mail and add it in the body of the mail sent by the bot !

I don’t want the user to download any attachments.

I also want to Forward an email. My Email Body formatting gets lost when Hyperlinks are included: instead of fowarding it as Hyperlink the email is read as string and forwarded.
e.g. the word “Google” has the Hyperlink “www.google.com
it is forwarded the following way:
HYPERLINK “www.google.com” Google

any ideas on how to Keep the Format and Hyperlinks?

thanks you

Hi can you give an example how you have used replyto in UIPath .
i have assigned like this stremailid = new System.Net.Mail.MailAddress(strPMEmailID).ToString
but how to pass this is in Send Outlook mail

Hi Rishi,

Have you come across any solution ???

Did anyone find a resolution for HTML/formatting?

do you resolve the question? i was doing something the same as you

hey !! Sorry for late reply. No, No solutions as of now.

You can use this if you like for non html:

MailReply.xaml (10.7 KB)

Reply :
image

Reply All:

image

image

nothing fancy, just adding few lines. Might saves others time.

subject = "Re: " + email.Subject

body = newReply+Environment.NewLine+Environment.NewLine+"From: "+ email.From.Address+Environment.NewLine+"Sent: "+email.Headers.Get("date")+Environment.NewLine+"To: "+string.Join(",",email.To) +Environment.NewLine+"Cc: "+string.Join(",",email.CC)+Environment.NewLine+"Subject: "+email.Subject+ Environment.NewLine+ email.Body
4 Likes

Hi,

Any suggestions for replying HTML body?

Hi @vvaidya, can you suggest to replace instead of keeping the button in the message activity to proceed in the IF condition(button=Yes) in MailReply.xaml (12.6 KB)

Thanks,
Sushmitha.

Good is very good,…

To Replay an unread email use the following activity

Activity:
Replay to Outlook mail message
image

Mail: list of all emails

it you want to replay for all the checked check box “Replayall”
image

only we need look for email body data format

2 Likes

Hi @Devyani

What is mailMessage in the Input in the properties Tab.
i want to send reminder email from Sent Items.
Thanks.

Hi @SrenivasanKanna

MailMessage is all emails in the outlook folder

1 Like