Friday, September 02, 2005

How to change the mailbox for SQL mail

Scenario: You have Mailbox X attached to all xp_sendmail. You will like to use a different mailbox say Mailbox Y. How to do it?

On the SQL server open up the Profiles set-up for mail. This can be found in the Control Panel in Windows 2003 operation systems. Edit the current profile to change the mailbox name. Save the changes. But remember one thing, you will need to run a xp_stopmail command in SQL and then Xp_startmail. Only then will the reference of the old mailbox be removed from the SQL server and it will get associated with the new mail box.

The last point is the kicker.