Link to home
Start Free TrialLog in
Avatar of cmdias
cmdias

asked on

Send emails from SQL server without outlook

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.


Regards,

-Carlos

Avatar of mdougan
mdougan
Flag of United States of America image

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.



Cheers!
ASKER CERTIFIED SOLUTION
Avatar of andrewbleakley
andrewbleakley
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zzzxtreme
zzzxtreme

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