Send emails from SQL server without outlook

Posted on 2005-05-16
Last Modified: 2008-07-24
Is there another way to send emails from SQL 2000 server other then installing outlook ?
 I just did a clean install of my server and dont feel like installing outlook unless it is my only option.



Question by:cmdias
    LVL 18

    Expert Comment

    Hi cmdias,
    From the Transact SQL Help file (search on MAPI), you can send mail by calling some system stored procedures... however, the machine does need to be set up with some sort of MAPI mail client software (doesn't have to be outlook... any MAPI complient e-mail package will do)


    The computer running SQL Server must be set up as an e-mail client. SQL Server Enterprise Manager is used to assign an e-mail account and password to the SQL Server installation. The mail component of SQL Server can then be enabled to start automatically when the SQL Server Agent service is started. Alternatively, the mail component can be started and stopped at will using either SQL Server Enterprise Manager, or the xp_startmail, xp_stopmail, and xp_sendmail stored procedures.

    When the mail component of SQL Server is running, it can be used to:

    Send e-mail from Transact-SQL batches, scripts, stored procedures, and triggers using xp_send_mail. The e-mail can be:
    Message strings.

    The result set of a query.

    A Transact-SQL statement or batch to execute.

    A page for an electronic pager.
    Read e-mail using sp_processmail, or a combination of xp_findnextmessage, xp_readmail, and xp_deletemail. The messages sent to SQL Server typically contain a Transact-SQL statement or batch to be executed. The statement is executed and the result set is returned as a reply e-mail with an optional CC: list.
    SQL Server events and alerts can be combined with SQL Mail functionality to build a system in which a server running SQL Server can e-mail or page the relevant administrators automatically if serious conditions arise.

    LVL 11

    Accepted Solution

    Use xpSMTP which you can get from

    It works fantastically and allows HTML messages etc etc.

    Easy to get running and runs great
    LVL 2

    Expert Comment

    u can use outlook programming through COM object as supported by SQL Server
    with outlook's com object, u can manipulate messages, attachment etc etc...
    im sure the free outlook express will also include the com object

    search for "outlook com programming" or something

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now