Having never used Win32 (or Perl on Windows in general), this is an absolute guess, but does the Win32::OLE->LastError() cause the popup? I looked at the module docs on CPAN and it didn't mention a popup error.
This issue does sound remotely similar to an ssh issue I was having a while back, where the new() method would return successfully, but the object would immediately be destroyed by the connection not being able to completed successfully. (the new method doesn't check for successful connection, only that the object was created, unless I'm mistaken). I resolved that issue by adding another check after the ->new() method, checking to see if the object existed, but before I tried to perform any methods on it. Can you add something like this:
my $session = Win32::OLE->new(qw(Win32::OLE->new(qw(MAPI.Session)))) o
+r die Win32::OLE->LastError();
if(!object exists) { do_something; exit; }
my $mapi = $session->Logon....
Again, that's a guess, but I hope it helps.