I'm not sure if this is the right forum to place my question, hope it is :)
I would like to write a c# application to check the mail queue in exchange and start / stop the queue through this application.
Checking the mail could be done with event sinks, but what about starting and stopping the queue. Is that possible?
Thanks in advance
Start / Stop Mail Queue on Exchange 2003
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Bechir BejaouiRank #144 · 15.9K pointsPosted Feb 26, 2009, 2:12 AM EST
MessageQueue mqueue = new MessageQueue();
//This method will make the message queue in a standby state for any message
IAsyncResult Async = mqueue.BeginReceive();
//TO do perform you code here
//This method
Message Recived = mqueue.EndReceive(Async);
//close the message queue
mqueue.Close();
It's better to do that asynchormously
Riccardo3 pointsPosted Feb 26, 2009, 7:03 AM EST
Probably I should explain a little bit more about the functionality I would like to implement. Basicaly I would like to check every outgoing mail. Therefore I would like to
1. stop the smtp queue
2. wait for messages
3.check these messages (allowed or unallowed and probably remove some of them)
4. Start the smtp queue, so the messages can be send
Bechir BejaouiRank #144 · 15.9K pointsPosted Feb 27, 2009, 2:44 AM EST
Riccardo3 pointsPosted Feb 28, 2009, 12:32 AM EST
Bechir BejaouiRank #144 · 15.9K pointsPosted Feb 28, 2009, 1:04 AM EST