We are using SDL tridion 2013 SP1 .The outbound email mailer service doing something wrong it is keep logging below error in log file . we did check in outbound email database inside table "Queued_Emails" there are few emails which are not getting deleted and may be cause of this error below is detailed error
Stored procedure failed: SP_MAILINGS_SAVE_LINKURLS
at Tridion.AudienceManagement.DomainModel.Dal.DataSession.OpenRecordsetByStoredProcedure(UserContext userContext, String sProcName, Dictionary`2 parameters, Dictionary`2 outputParameters, Int32 timeoutSeconds)
at Tridion.AudienceManagement.DomainModel.Dal.MailingDal.SaveLinkUrls(TcmUri mailingURI, EmailLinkUrls linkUrls)
at Tridion.AudienceManagement.DomainModel.MailerBatches.FetchedMessage.UpdateTmsLinksInRenderdContent()
at Tridion.AudienceManagement.DomainModel.MailerBatches.FetchedMessage.PreProcessMessage()
at Tridion.AudienceManagement.DomainModel.MailerBatches.FetchedTestMessage.PreProcessMessage()
at Tridion.OutboundEmail.Services.Mailer.OutboundEmailMailer.HandleTestMessages(Dictionary`2 messages)
2016-08-18T15:28:37 [Error] ORA-01400: cannot insert NULL into ("SH_OEDB"."EMAIL_LINKURL"."EMAIL_LINK_URL")
ORA-06512: at "SH_OEDB.MAILINGS_SAVE_LINKURLS", line 22
ORA-06512: at line 1
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.DataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at Tridion.AudienceManagement.DomainModel.Dal.DataSession.OpenRecordsetByStoredProcedure(UserContext userContext, String sProcName, Dictionary`2 parameters, Dictionary`2 outputParameters, Int32 timeoutSeconds)