Failure sending mail: Retrieving the COM class factory for component with CLSID {CD000001-8B95-11D1-82DB-00C04FB1625D} failed due to the following error: 8007007e. Mail will not be resent.

Have you been seeing this error on your SSRS Subscriptions page.

Failure sending mail: Retrieving the COM class factory for component with CLSID {CD000001-8B95-11D1-82DB-00C04FB1625D} failed due to the following error: 8007007e. Mail will not be resent.

 

This generally occurs when you have missing DLL files which are required to send an email.

So how to troubleshoot this error?

1) We need to start of by identifying which DLL is causing this issue. So to start that get the CLSID value from the above  error message itself.

2) Then try to find this key value in this registry path. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID

3) This will show you the exact DLL it is referring to. In my case it was  CDOSYS.DLL

4) The next thing we need to do is to download a tool called Dependency Walker. https://www.dependencywalker.com/ .Download load the latest version as per your system architecture.

5) Extract the zip file and Run depends.exe . Click on File Menu\Open.  Browse to the folder location which contains this DLL. It is C:\Windows\System32 and select the CDOSYS.DLL file

6) Once you select the file, it will load all the dependent DLLs and point out any missing DLLs. This is the place where you can see which DLL files are missing and causing this error. It gives a clear message with the Error symbol

7) Once you have identified the missing DLL files, You can copy these file from another machine running the same OS version. In my case the missing DLL files were INETCOMM.DLL and MSOERT2.DLL

8) Once i have copied these missing DLL files into the system32 folder, I was able to send emails from SSRS Email Subscriptions.

 

Background:

SQL Server 2005 is running on a Windows 2003 SP2 Server

In Windows 2003, SSRS uses CDOSYS.DLL to send emails.

CDOSYS inturn uses INETCOMM.DLL and MSOERT2.DLL to send emails.

As these files are missing, We were getting the above error. These files are installed by the Outlook Express component. So as somebody uninstalled Outlook Express from the server. We were getting this error.

 

Note:- You need not register these DLLs after copying them from other machines as they are not COM DLLs.