Exception Message on Send Mail Activity: The specified object was not found in the store

I have an automation that has been running for a long period of time without any issues. Recently, I’ve begun to encounter this issue: Using the ‘Send Mail’ activity to send email from shared mailbox, Using Microsoft exchange activity’s to send email.

Here is the exception message I’m getting:
Send Mail: Code: ErrorItemNotFound Message: The specified object was not found in the store. ClientRequestId: 35e23810-487e-400b-a869-60200713cc62

I’m using a UiPath.MicrosoftOffice365.[Activities].
Any help would be greatly appreciated.

Hello @Ashok_Jadhav1

Sequence Name: Main

  1. Assign Activity:

    • Variables:
    • EmailSubject (String) = “Hello from UiPath”
    • EmailBody (String) = “This is a test email sent from UiPath.”
  2. Send Mail Activity:

    • MailMessage:
    • To: “recipient@example.com
    • Subject: EmailSubject
    • Body: EmailBody
    • MailAccount:
    • Configure your email account details.
  3. Log Message Activity:

    • LogMessage: “Email sent successfully!”
    • LogLevel: Info
  4. If Activity:

    • Condition: MailSentSuccessfully (boolean variable)
      • Then:
      • Log Message: “Email sent successfully!”
      • Else:
      • Log Message: “Email failed to send.”

Thanks & Cheers!!!

I didn’t get you @Kartheek_Battu

Hello @Ashok_Jadhav1

Sequence:
Variables:
mailMessage: System.Net.Mail.MailMessage
smtpServer: System.Net.Mail.SmtpClient

Assign: 
    mailMessage = New System.Net.Mail.MailMessage()
    mailMessage.From = New System.Net.Mail.MailAddress("your@email.com")
    mailMessage.To.Add("recipient@email.com")
    mailMessage.Subject = "Your Subject"
    mailMessage.Body = "Your email body"

Assign:
    smtpServer = New System.Net.Mail.SmtpClient("yourSMTPServer")
    smtpServer.Port = 587
    smtpServer.Credentials = New System.Net.NetworkCredential("yourUsername", "yourPassword")
    smtpServer.EnableSsl = True

Try:
    Invoke Method:
        Object: smtpServer
        MethodName: "Send"
        Parameters: mailMessage

Catch:
    Log Message: "Error sending email: " + Exception.Message

I’m getting the same error using the Office 365 Send Mail activity (Microsoft 365 v1.14.1). This process has been running fine for months and started acting up in the last week.

Anybody find any resolution yet?

Exact solution not sure;however below steps I can suggest

  1. try sending manually, clear drafts, outbox, unread emails etc
  2. Login and logout the account once
    try password reset too
  3. try sending the email from different machine
  4. if issue is for only 1 bot user account or all bots ?
    if 1 user account , update group policy on that VM
  5. and get the account reset done from IT
    May be u have tried these …

Thanks !

This is resolved for me.

Soluction: Update Microsoft office package to 2.2.3 and excel package to latest one.
This is how my issue got resolve.

Just to add to this, this week we also started to see random errors with SendMail of “NotFound Microsoft.Graph.ServiceException: Code: ErrorItemNotFound Message: The specified object was not found in the store” using the package UiPath.MicrosoftOffice365.Activities v1.14.1.

Updated a production package to 2.2.7 (highest we can go atm) and will monitor.

Please do let me know if this resolves the issue for you. Thanks!

It is resolved. I have provided solution which worked for me in last comment of mine.

Issue seems to be resolved for us upgrading UiPath.MicrosoftOffice365.Activities to 2.2.7.

Office 365 Scope Auth - Client ID/Secret
Studio - 23.4.4

But the issue is happening in studio 2023.10.4 and i have updated package to latest version.

https://forum.uipath.com/t/send-email-code-erroritemnotfound-message-the-specified-object-was-not-found-in-the-store/706944/2

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