Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send mail in SQL Server 2005

Status
Not open for further replies.

sqlcasey

Programmer
Sep 21, 2006
150
US
Hello,

I am wondering, what is the correct way to send mail from SQL Server 2005?

For example, we have an older 2000 job that used to run every 5 or 10 minutes or so, which called a stored procedure that read a table in the database and used xp_smtp_SendMail to send the mail.

This job has never run propery in 2005, and remains broken.

Is this just a simple matter of replacing the xp_smtp_SendMail with a similar 2005 version?

Or does this require something new and different?

BOL recommends using "Database Mail" instead of xp_smtp_SendMail... but there's also other stored procedures, such as "sp_send_dbmail", so I'm
confused.

Any clarification appreciated.

Thanks much


 
sp_send_dbmail is the stored proc that actually sends the email. It's part of database mail.

xp_smtp_sendmail is a third party tool, that works fine on SQL 2005 (I've got a machine using it instead of sp_send_dbmail).

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top