I need to send email from SQL Server SP. Until now I used sp_send_cdosysmail. Is it better to use sp_send_dbmail? And the main question - which mail server is used by sp_send_dbmail - is it configured somewhere?


1 Answer 1


Database mail depends on what server, profile is configured in Database Mail Ref: Configure Database Mail

as for using sp_send_dbmail, see sp_send_dbmail (Transact-SQL)

This db mail functionality is available from SQL Server 2005.

See also these example database mail configuration scripts by Dan Guzman.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.