I am working with the sample InternetEmail application , now i am confused with its working , does it connects to the remote mail server or it connects to the default client on the phone because what happening is

if i go into the default messaging application and i do all the settings and then download the headers , and then i go in that application and then Set the protocol to Pop3 it shows me the header list but if i do it before i dowload the headers through the default Mail application then it shows me no Data , so what i thing is it(InternetEmail Application) is connecting itself to the buffer of the default mail application where it stores the headers of mails dowloaded by it , and it is not getting connected to the remote server

Am i right and if it is true then which are the APi's to retrive the mail directly from the mail server

I will be very thankful if i get a small code snippet