I think the problem is that you want to send an email, seeing your code :
and msg contains them mail you want to send.
But pop3 is a protocol to read mail you receipt.
If you really want to receive mail, you should code
something like tmpTransport.receive(...);
i'd never write a pop3 reader
The good protocol to send a mail should be 'smtp',
so you should code :
Transport tmpTransport = session.getTransport("smtp");
That the reason why you have the message 'Invalid provider'
Hope this help you