Office 365 - Outlook Email Error - ErrorInternalServerError

I’m using the Microsoft Office 365 Send Mail activity and keep getting the error message “ErrorInternalServerError”.

The complete error message reads “Send Mail: Code: ErrorInternalServerError Message: An internal server error occurred. The operation failed.”

The weird part is that I’ve been using the same activity for years now without issue.

To give a little background of the process, it is taking accounting journals in the form of excel files located in a shared folder and uploading them to PeopleSoft; it either successfully uploads the journals or runs into an error message which will throw a business exception. Once the process has completed every item, it then generates a report of the status from the orchestrator queue and loops through that report to send an email back to the user that states the status of their upload, attaches the original file, and then moves the file to a processed folder.

I’ve tried sending the email without attachments and adding various wait times (up to 30 seconds) between emails, but neither work. The error appears to be random. I’ve run the same data through 10 times and it always fails on different files.

Some extra information, my company uses an Azure connection authenticated through an ApplicationID and secret.

Does anyone have any information on what could be causing this error?

Apparently, this kind of error appears when storage space is low. (I think this error may occur for other reasons as well…)

Since the free space is not zero, I am able to receive emails, but it seems that I cannot send them.

This problem was resolved by increasing the free space.
If this is the case, I think the same error will occur when sending email using Office 365 on the browser.

I checked our account and it has only used 15GB of the 50GB available.

It seems like another factor. Is it possible to send emails using Office365 on a browser without errors?

Yes, I just tried, and it worked fine. What is weird is that we have hundreds of other processes that are sending out emails constantly and none of them are having this issue.

The only differences between all of the other processes and this one failing is the send mail is within a ‘for each row in data table’.

Hmm, then I think it’s an API authentication issue. In that case, I think you won’t know the cause unless you talk to the Office 365 internal administrator.I have also heard of cases where the rule is to apply a client certificate to the device when using the REST API, and the certificate expires, resulting in an error when attempting to authenticate when sending an email.

@Garret
I’m getting the same issue, is there any update?

I was out of office last week, but I sent in a helpdesk ticket and received this back:

Kindly check the following

*Place a delay like ‘Delay’ activity between each send mail function. It would give some buffer time for server request handling.
*Please check if there is a connectivity issue with the Office 365 server, perhaps due to maintenance or network fluctuations when the issues are faced. please check internally with the time stamp.
*Please check if the enough storage is available.
*The package version is pretty old, could you please try upgrading to the latest and next to latest. Please check if it helps the issue.
*Can we place the send email activity in retry and once the exception is thrown, we can retry sending the mail ( 2-3 times).

If the issue persists.
*Kindly let us know if you are running the job attended or unattended or from studio?
*Please use the option run from studio. When it fails, we will see the detailed error ( as the internal server error is generic)
*Are you able to reproduce the issue on command?
*If yes, Can we print the data stored in data table ahead of sending email, so that we can see if the content is null or any difference with the successful send.
*I understand print the data every time might be hectic task, but was wondering if we can do that for a limited time when trying to reproduce the issue as a possible troubleshooting step.
*Kindly provide the timestamp of the issue once reproduced.
*Please share the Diagnostic Tool logs.

I have not had time to try it yet, but I will start doing the actions which I have not tried yet later on today.

1 Like

I don’t know what happened, but I was able to run my process multiple times yesterday and it worked without any errors. Not sure if there was a patch made in Azure or what.

1 Like

I have used the retry scope activity and the process is working fine with it.