Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 SQL 2005 Database Mail Shutting Down

Author  Topic 

hoghunter
Starting Member

9 Posts

Posted - 2008-01-24 : 19:23:17
I have setup database mail on my SQL 2005 server. It works fine. I am using it to send subscription mail. If the email addresses are good, it works fine. If there is a bad email address rather then skipping that email address, it shuts down and quits the rest of the process.

Is there a way to configure it to log the error and move on? With SQL 2000 all it did was toss it into a queue and hope. The SMTP server dealt with the problems. Now it seems Database Mail is determining there is a problem and giving up.

While I love the new sysmail tables that allow me to track what happened, I hate the fact the the system decides if is too frightened by an error and it needs to runaway and hide.

Also, does anyone know of a good resource for describing the sysmail table relationships?

Thanks in advance for the help,
Thom

Haywood
Posting Yak Master

221 Posts

Posted - 2008-01-25 : 16:17:07
Use the old-school DBMail instead of the new SMTP only Database Mail.

DBMail requires you to install Outlook and will use the mapi driver and give you back your desired functionality.
Go to Top of Page

hoghunter
Starting Member

9 Posts

Posted - 2008-01-25 : 16:26:54
quote:
Originally posted by Haywood

Use the old-school DBMail instead of the new SMTP only Database Mail.

DBMail requires you to install Outlook and will use the mapi driver and give you back your desired functionality.



I don't want to go back to old school. In fact the new sysmail architecture was very helpful in finding the issue. The old SMTP server was horrible to debug. Tracing an email was very difficult when you send large volumes of email. I send 50,000- 100,000 emails a week. The log files become so big, it is impossible to query and mange them. The new architecture uses a database/table schema to capture logging info. What a concept! That schema is easily queried, archived, etc.

Plus, I have too much time invested in a new system that we built around database mail to switch back to the old style dbmail.
Go to Top of Page

Haywood
Posting Yak Master

221 Posts

Posted - 2008-01-25 : 16:32:43
Sadly, the problem you've detailed out in the original post, is one that is created when you're only using an SMTP.

The old mail system actually used the mapi provider from Outlook to communicate with Exchange. Now, mail is simply an SMTP message constructed by the sql server and sent to an SMTP port. You've given up features and ease of use for a 'fire & forget' system, and that means giving up functionality and ease of use.

You may want to see about an external bulk-mailer program that you can drive from the values in the database...


Go to Top of Page

hoghunter
Starting Member

9 Posts

Posted - 2008-01-25 : 17:40:14
quote:
Originally posted by Haywood

Sadly, the problem you've detailed out in the original post, is one that is created when you're only using an SMTP.

The old mail system actually used the mapi provider from Outlook to communicate with Exchange. Now, mail is simply an SMTP message constructed by the sql server and sent to an SMTP port. You've given up features and ease of use for a 'fire & forget' system, and that means giving up functionality and ease of use.

You may want to see about an external bulk-mailer program that you can drive from the values in the database...






Actually, the old dbmail did not use Exchange unless you had an Exchange server setup. We used the dbmail system on SQL 2000 with the IIS SMTP server and it worked nicely. The problem was with managing the errors and the logs.

The new database mail system uses the same SMTP infrastructure. However, it does give a nice query interface into the logs. The problem is that it seems to be configured to shutdown on error. I would like to be able to set it to fire and forget. Or perhaps if it finds an error, log it and move on. I do not want it to shutdown.

Do you know anything about how to configure the behavior of database mail with regards to error handling? Do you know of any books, or other resources that discuss this?

The suggestion of going to a bulk mail tool it worth considering however, the point of our system is to build our own custom mail tool. We have some tricky manipulations each time when do a mailing based on the date and an ever changing event calendar.

BTW, thanks for the input so far.
Go to Top of Page

Haywood
Posting Yak Master

221 Posts

Posted - 2008-01-25 : 17:43:34
Sorry, I don't have any material on configuring or errorhandling for dbmail...just what you'd normally do in your t-sql...

You're welcome for the input. Personally, I think they took a step backwards with the new mail system, but thats just me. ;)
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-01-25 : 18:05:26
quote:
Originally posted by hoghunter

I have setup database mail on my SQL 2005 server. It works fine. I am using it to send subscription mail. If the email addresses are good, it works fine. If there is a bad email address rather then skipping that email address, it shuts down and quits the rest of the process.

Is there a way to configure it to log the error and move on? With SQL 2000 all it did was toss it into a queue and hope. The SMTP server dealt with the problems. Now it seems Database Mail is determining there is a problem and giving up.

While I love the new sysmail tables that allow me to track what happened, I hate the fact the the system decides if is too frightened by an error and it needs to runaway and hide.

Also, does anyone know of a good resource for describing the sysmail table relationships?

Thanks in advance for the help,
Thom


I don't see the behavior that you describe when I send an email to an invalid address.

Maybe there is just something wrong with your database or email server. You might consider contacting Microsoft tech support.






CODO ERGO SUM
Go to Top of Page
   

- Advertisement -