Advanced Querying

SQLServerCentral Article

Using Xp_sendmail With the Recipients Generated From a Query

  • Article

Xp_sendmail is a great utility that SQL Server provides in order to e-mail messages directly from SQL Server, by using a valid MAPI profile. However, its syntax is rather stringent. In this article by Kunal Das, he shows you how to send messages to a list of recipients generated by a query dynamically in T-SQL.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-02-18 (first published: )

23,997 reads

Blogs

T-SQL Tuesday #203: Risk and Reward

By

This is timely, as I’m currently on a boat in the Adriatic taking a...

dataMinds Connect 2026 – Slides & Scripts

By

You can find the slides and SQL scripts for my session “Spice up your...

How to Clear the SSMS Cache (SSMS 21 and Later)

By

How to Clear the SSMS Cache (SSMS 21 and Later) Updated...

Read the latest Blogs

Forums

SSL/TLS Cert Validity Periods Decreasing

By Phil Parkin

Hi, to all of you who are using CA certs on SQL Server boxes...

It's Never Just One Thing

By Grant Fritchey

Comments posted to this topic are about the item It's Never Just One Thing

Calculating Min-Max Normalization in PowerBI

By Dinesh Asanka

Comments posted to this topic are about the item Calculating Min-Max Normalization in PowerBI

Visit the forum

Question of the Day

Checking the Error Log III

If I want to run sp_readerrorlog on SQL Server 2025, what permissions do I need?

See possible answers