PDA

View Full Version : [Java] Checking hotmail availability



danielsan
07-11-2013, 01:00 AM
I have a few hundred thousand hotmail emails to check if they are available, and I can't find a public program that can do this anymore so I thought I would make my own. I am using this site to test if they are available or not: [Only registered and activated users can see links] However something isn't right because the cookie that gets returned always is set to "MSPMemberExists=OtherError" so my checkEmail method always returns false. Does anyone have any ideas as to why this isn't working?


private boolean checkEmail(String email) {
[Only registered and activated users can see links] connection = null;
try {
URL url = new URL("[Only registered and activated users can see links]" + new Date().getTime());
connection = ([Only registered and activated users can see links]) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Cookie", "MSPMemberExists=" + email);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
return connection.getHeaderField("Set-Cookie").contains("MSPMemberExists=" + email);
}
}

danielsan
07-21-2013, 09:30 PM
For anyone that is interested, the reason I was getting MSPMemberExists=OtherError was because the emails I was using were not valid which was causing the error. When I put in valid emails it worked like it was supposed to.