First, your software is absolutely fine, but maybe I found a bug :
In Mailtosms, if I use POP, message received in the mailbox is constantly sent via SMS (it is send every minute). If I use IMAP, no problem, the message is send via sms only once !
IMAP handles read messages properly. I believe that POP requires the message be marked as read manually. However I do not know how that is handled in the application. I’d stick with IMAP, POP is deprecated and not very secure.