i dont imagine this would be a problem, as PHP hides all type stuff away from you (although you can force it to cast and stuff if you want)
you can use intval(mixed var [, base]) to evaluate anything to an integer, with a choice of base, but as i said above, PHP is usually smart enough to handle this for you...
what is the value imap_delete() returns... does it reckon its succeeded? if not... what does imap_errors() give you?
and are you using imap_expunge($stream) after marking messages for deletion? i dunno...
dom
🙂