Everything was working fine till last week when we had issues with our mail server. I was instructed my our admin to change from the ip address in the dbmail provile to and smtp address. Since then I have been having issues. Right now it is just with SQL agent , which is still pretty important. Here is what I have:
In Database Mail, I have a profile with an account. If I use this profile in using sp_send_dbmail, I get the email.
My issue is with SQL Server Agent. I have gone to properties , alerts and have the database mail profile specified.
If I stop and start the SQL server agent I get the message
[474] Unable to refresh Database Mail profile XXprofilenameXX. (reason: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException: Mail configuration information could not be read from the database. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.Byte[]'.
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)
)