I have tried your code and it works up to the last step. I get the following result:
array ( 'connection' => 'Connected: 220 mi23 ESMTP service ready ', 'ehlo' => '250-mi23...
Type: Posts; User: email@example.com
Search: Search took 0.01 seconds.
Results 1 to 1 of 1
Click Here to Expand Forum to Full Width