How to add more than 2 senders mail address in outlook mail

Hi Team,

I am using send outlook mail activity. I need to send same email for nearly 8 people. If i add only 2 mail address in “To” sections , it sends e mail successfully. If we add more than 2 persons email address in “to” option then mail will not send to the receipient iam getting the below error

Main has thrown an exception

Source: Send Outlook Mail Message

Message: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

Exception Type: COMException

System.Runtime.InteropServices.COMException (0x80004004): Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))
at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

sendmail.pdf (14.8 KB)

Hi @rakeshadn,

What values you are passing in To Field? , Can you please send the value for 2 email ids? you can send dummy emails.

Best regards,
Avi

1 Like

Hi @rakeshadn,

Check the following syntax and give it a try:
String.Join(“;","abc@xyz.com,"abc@xyz.com")

This block of code goes in the “To” Field. You can add more email ids in the same format.
Thanks,
Jiban

1 Like

hi @rakeshadn please do send it in this format

abc@abc.com;xyx@xyx.com;qwe@qwe.com

it will work use " ; " to add multiple emails.

2 Likes

keep “;” special character in the between the Email ids

1 Like

rakeshadn2@ayon.com”“raju@ayon.com”“sudheer@ayon.com

1 Like

Hi,

i tried your format just now, it doesnt’ work for me.if we provide email address “;xyx@xyx.com;qwe@qwe.com” in this format then in expression editor “OK” button itself get disabled.

1 Like

It works for me!

1 Like

please share the screen shot, because its working fine with me.

please try this “xyx@xyx.com;qwe@qwe.com” it works

Kill the application before using the outlook activity and then put the delay after that. That will solve the problem .

Hi all,

i also follwed the same format but it doeant works for me.Please see the below image for clarification.
email1.pdf (32.2 KB)

the below is the error message iam getting while execution:

Main has thrown an exception

Source: Send Outlook Mail Message

Message: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

Exception Type: COMException

System.Runtime.InteropServices.COMException (0x80004004): Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))
at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@rakeshadn Are you behind a firewall??

If yes’ it looks like a security issue sending emails from a 3rd party application.

Did you check if firewall /antivirus is blocking?

This needs to be done :

Please check with your IT Team. This can be something related to Group Policy.

You need an exception to Bot VDIs from standard GPO. So that 3rd party application can send email via Outlook.

Please change the Group Policy to VDI and it should work.

But if i provide only 2 email ids, then it is working.

Thank you !, this is worked for me.