Query size of Exchange 2003 email queue
Posted on 2013-01-06
I am using various SQL stored procedures to generate emails through cdo. Emails are submitted to an Exchange 2003 server (on a different physical server on the LAN) where they sit in a SMTP queue until delivered (using DNS....no smart host).
I would like to find the oldest and newest date created for items in the queue and potentially the domains being delivered to, essentially providing similar information as is accessible via the Exchange System Manager queue snap-in.
How can I programmatically query the size of the mail queue, whilst fetching other metadata as above, using either ASP or a SQL function in order to display this in my ASP app?