try to modify the line before "oSession.logon" :
$strProfileInfo = $server + " " + $mailbox

this is not correct because in vb, this is
strProfileInfo = server & vblf & mailbox

you should try :
$vbLf = Chr(10)
$strProfileInfo = $server + $vbLf + $mailbox

look at Logon Method (Session Object)
for more informations.
_________________________
Christophe