How to check for unsent email
01.01.2007
var
Outbox: MAPIFolder;
UnsentMail: integer;
...
Outbox := NmSpace.GetDefaultFolder(olFolderOutbox);
UnsentMail := Outbox.Items.Count;
if (UnsentMail > 0) then
ShowMessage(Format('Unsent items in Outbox: %d', [UnsentMail]));
The constant olFolderOutbox is defined in Outlook_TLB as $00000004