Delivery Queue

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
vinoji2005
New user
New user
Posts: 1
Joined: 2020-03-25 18:43

Delivery Queue

Post by vinoji2005 » 2020-03-25 19:12

Hi Team,

I'm looking at the script for getting delivery queue detail using PowerShell script. I did search in google but I'm not able to find any of script.If someone could you please helpe me

Regards,
Vinoth.S

palinka
Senior user
Senior user
Posts: 1941
Joined: 2017-09-12 17:57

Re: Delivery Queue

Post by palinka » 2020-03-26 14:46

vinoji2005 wrote:
2020-03-25 19:12
Hi Team,

I'm looking at the script for getting delivery queue detail using PowerShell script. I did search in google but I'm not able to find any of script.If someone could you please helpe me

Regards,
Vinoth.S
You can try this:

Code: Select all

$hMSAdminPass = "supersecretpasssword"
$hMS = New-Object -COMObject hMailServer.Application
$hMS.Authenticate("Administrator", $hMSAdminPass) | Out-Null
$hMSDeliveryQueue = $hMS.Status.UndeliveredMessages()
$hMSDeliveryQueue
I tried it but I don't have anything in my queue so I can't say if it works or not. It comes up empty for me, but it did something.

Post Reply