0

Been trying for weeks now to get this set up and have had no luck. Have tried changing accounts and profiles, added databasemailuser permissions to mine and several other accounts, but still get this message

    1) Exception Information
        ===================
        Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.Account GetAccount(Int32)
HelpLink: NULL
Source: DatabaseMailEngine

StackTrace Information
===================
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.SessionManager.GetAccount(Int32 accountID)
   at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
   at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)

I have been unable to find any answers out there so thought I'd try this out.

enderv
  • 203
  • 1
  • 2
  • 7
  • Please, provide the following information: a) a piece of source code which causes this exception; b) framework version you are using; c) SQL server version and edition you are using. Also, tell if your Database Mail component is set up and tested using SQL Server Management Studio. – Serg Sep 25 '13 at 09:43
  • SQL Server Enterprise 64 bit 2005 I believe Server edition: 9.00.1399.06 And this is what I get each time I try to send a test email through management studio after I added a profile and account. – enderv Sep 25 '13 at 19:31
  • So the next step is to try sending test message using Outlook Express with the data of your account specified in Database Mail profile - to make sure that security settings of the server doesn't block sending mail and your account set properly to communicate with SMTP server. – Serg Sep 26 '13 at 07:37
  • Thanks for the idea. I will be sure to give that a try this weekend. Just a question though, wouldn't the error message have been unable to communicate with email server if that were the case? Either way I will try this tonight and let ya know. – enderv Sep 27 '13 at 21:21
  • So tested it out. Took me awhile as we don't have a mail client on the server but was able to send a test email using the same settings I have set in database mail. But I still get the same error in database mail. – enderv Sep 29 '13 at 18:48
  • Well I redid everything through a script instead of using the GUI assistant and now it works.... – enderv Sep 29 '13 at 21:23
  • Congrats! So it's seemed to be configuration error. It's almost impossible to help in such case but the only way is to stimulate searching new ways to solve a problem. Do not give up and you win as you did. – Serg Sep 30 '13 at 06:43

0 Answers0