Anushka K Rajasingha


I have no idea about how can I use xp_sendmail

when I try to use it this error displayed on the screen.

There is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail ...





Re: Sql server 2000 - xp_sendmail stored procedure

Phil Brammer


This is not an SSIS question. Moving to Transact-SQL.





Re: Sql server 2000 - xp_sendmail stored procedure

davidbrit2

Your first step will be to install Outlook 2000 on the machine that's running SQL Server. It must be the 2000 version, unless you're working with an Exchange server, in which case you can get away with 2002. If you're doing SMTP, then use 2000.

Then you have to use the usual right click, Run As to launch the Mail control panel for the service accounts used for both SQL Server, and Server Agent. The control panel will likely be here: C:\Program Files\Common Files\System\Mapi\1033\NT\MLCFG32.CPL. If you don't see it, just search for that filename.

Set up the email accounts as necessary. If you like, launch Outlook using Run As to test that it's all working. I'd highly recommend doing this before moving on.

After you've got the accounts settings in order, go over to Enterprise Manager, and work your way to Support Services > SQL Mail beneath the server you're working with. Right click the icon in the tree and go to the properties. Pick the name of the MAPI profile that you just set up using the Mail control panel. This will allow xp_sendmail to (hopefully) work.

To get Server Agent sending notification mail properly, go to Management > SQL Server Agent, right click and go to properties. Pick the mail profile you set up (note that this mail profile must be one associated with the Server Agent service account).

It's kind of a pain to get it all working, but once you do, you'll wonder how you lived without it.





Re: Sql server 2000 - xp_sendmail stored procedure

Anushka K Rajasingha

when I try to set the mail session this error comes

Error 18025 : xp_test_mapi_profile : failed with mail error 0x80004005