Monday, 13 May 2013

Count mail messages in exchange queue VB.NET



To monitor for long queues in the SMTP mail on exchange (works on 2003) find the queue  folder on the exchange server and note its path.

in you VB project add this to a timer.


dim mypath as string
mypath = "\\mailservername\d$\Program Files\Exchsrvr\Mailroot\vsi 1\Queue"

Dim counter = My.Computer.FileSystem.GetFiles(mypath)

if counter > 'What ever you decide 
 'do something
end if

and their you have it if your queue gets clogged up for any reason then you will be alerted.

No comments:

Post a Comment

Samsung Android Keyboard

  If you have a Samsung phone or pad and the keyboard is set to Google give the Samsung one a try. Just go into the keyboard settings and ...