Error: "System.ApplicationException: Failed to add email recipients to the emailjob_recipients table" . When attempting to send a mailing.

When attempting to send a mailing that has an imported list, the following error/exception is received:

The original connection is closed.  Using a separate connection.  Error:System.ApplicationException: Failed to add email recipients to the emailjob_recipients table. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
   at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
   at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Blackbaud.AppFx.ContentManagement.Platform.Email.Catalog.USP_EMAILJOB_RECIPIENT_ADDEMAILRECIPIENTS.WrapperRoutines.ExecuteNonQuery(SqlConnection conn, Nullable`1 EMAILJOBID, Nullable`1 EMAILID, Int32& returnIntValue, Int32 timeout, SqlTransaction tran)
   at Blackbaud.AppFx.ContentManagement.Platform.Email.Catalog.EmailProcessor.AddEmailJobRecipients()
   --- End of inner exception stack trace ---
   at Blackbaud.AppFx.ContentManagement.Platform.Email.Catalog.EmailProcessor.AddEmailJobRecipients()
   at Blackbaud.AppFx.ContentManagement.Platform.Email.Catalog.EmailProcessor.ProcessEmail()
   at Blackbaud.AppFx.ContentManagement.Platform.Email.Catalog.ProcessCMSEmailBusinessProcess.StartBusinessProcess()

We recommend following our guide to How to troubleshoot Email Delivery Issues in Blackbaud Internet Solutions.

Beyond the guide above, if your environment is self-hosted, you will need to research if there is any contention over the EmailJob_Recipient table, which would manifest as Blocking in SQL snaps.

Note: There are a number of system procedures that read or write from this table, including sending emails and CRM integration, and if multiple attempts to interact with this table occur at the same time then some will have to wait while the first operations complete. This is what most often results in timeouts of this nature, rather than system connectivity or latency.  Other memory-intensive or email-related businesss processes running at the same time a job is processing may also contribute to longer-than-normal processing times for email jobs .

A couple of steps are available to assist with avoiding this situation:

  • Access Administration > Business Processes > History tab.  Filter on null "process type" (which looks for any process type) and "status" = "running" to see if there are any long-running processes that may be utilizing server resources
  • Staggering the submission of multiple email blasts so they process at different times
  • During times of high bulk email job processing, temporarily disable or reduce the frequency of Blackbaud CRM Integration in BBIS > Administration > Sites & Settings > Schedules
  • Delete historical email jobs that are no longer needed using the "Delete Email Functionality" included in version 4.0 Service Pack 8: 

To assist with the investigation of this issue, we recommend using our Blackbaud KnowHow guide, which contains details on the use of troubleshooting tools, such as SQL Snaps, FiddlerCaps, and more.

If you do not have multiple jobs or see no blocking when investigating this issue, contact Blackbaud support for further assistance.  


 Blackbaud Internet Solutions
 Blackbaud CRM

Was this article helpful?

Thanks for your feedback! Did this solve your issue?

Comments (optional):

Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):

Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.