Hi Team,
This use case was developed before to send emails using Send Outlook Mail Message activity .
I am trying to change from Send Outlook Mail Message activity to Send Exchange Mail Message.
As soon as i added Send Exchange Mail Message or after updating the UiPath.Mail.Activities. Getting below error.
Kindly suggest on this error
1 Like
postwick
(Paul Ostwick)
May 4, 2022, 1:33pm
2
Two different references have an Attachment method so it doesn’t know which you are trying to use. You have to be specific.
Change Attachment(path.ToString) to System.Net.Mail.Attachment(path.ToString) or Microsoft.Exchange.WebServices.Data.Attachment(path.ToString) - I’m not sure the differences between the two or which will work for you.
1 Like
postwick
(Paul Ostwick)
May 4, 2022, 1:35pm
3
By the way, I highly recommend using Send SMTP Mail Message. It’s much simpler and more reliable than going through Outlook or Exchange.
Hey @Sathish_Kumar_S
It is due to the missing namespace, just add New System.Net.Mail.Attachment(path.ToString)
Thanks
#nK
1 Like
May i know the name of the namespace to import?
1 Like
Hey @Sathish_Kumar_S
I guess it should be already imported.
Kindly add this in your statement System.Net.Mail
Thanks
#nK
yes it was already imported
Getting below after i have updated System.Net.Mail.Attachment(path.ToString)
1 Like
Hey @Sathish_Kumar_S
Add new keyword as well please before that.
Thanks
#nK
1 Like
system
(system)
Closed
May 7, 2022, 1:58pm
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.