| 132 | | |
| | 132 | |
| | 133 | /** |
| | 134 | * Execute the "UIDL" command |
| | 135 | * @param index Message index |
| | 136 | */ |
| | 137 | public String executeUidl(int index) throws IOException, MailException { |
| | 138 | if(EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) { |
| | 139 | EventLogger.logEvent( |
| | 140 | AppInfo.GUID, |
| | 141 | ("PopProtocol.executeUidl("+index+")").getBytes(), |
| | 142 | EventLogger.DEBUG_INFO); |
| | 143 | } |
| | 144 | String result = execute("UIDL " + index); |
| | 145 | int p = result.lastIndexOf(' '); |
| | 146 | if(p < result.length() - 2) { |
| | 147 | return result.substring(p+1); |
| | 148 | } |
| | 149 | else { |
| | 150 | return null; |
| | 151 | } |
| | 152 | } |
| | 153 | |