asp.net - Check if Email Address Belongs to Yahoo? -


private byte[] bytesfromstring(string str)     {         return encoding.ascii.getbytes(str);     }     private int getresponsecode(string responsestring)     {         return int.parse(responsestring.substring(0, 3));     }     protected void button1_click(object sender, eventargs e)     {         tcpclient tclient = new tcpclient("plus.smtp.mail.yahoo.com", 465);         string crlf = "\r\n";         byte[] databuffer;         string responsestring;         networkstream netstream = tclient.getstream();         streamreader reader = new streamreader(netstream);         responsestring = reader.readline();         databuffer = bytesfromstring("helo " + crlf);         netstream.write(databuffer, 0, databuffer.length);         responsestring = reader.readline();         databuffer = bytesfromstring("mail from:<myemail@yahoo.com>" + crlf);         netstream.write(databuffer, 0, databuffer.length);         responsestring = reader.readline();         databuffer = bytesfromstring("rcpt to:<" + textbox1.text.trim() + ">" + crlf);         netstream.write(databuffer, 0, databuffer.length);         responsestring = reader.readline();         if (getresponsecode(responsestring) == 550)         {             response.write("mai address not exist !");         }         databuffer = bytesfromstring("quite" + crlf);         netstream.write(databuffer, 0, databuffer.length);         tclient.close();     } 

hi, code not work smtp yahoo server code work gmail smtp server tcpclient tclient = new tcpclient("gmail-smtp-in.l.google.com", 25)

error:an established connection aborted software in host machine in line response string = reader.readline();

and change port server 25 not happen! whether smtp server , port server valid? there way make sure of email valid? me?

some server machine used algorithm responsing fetch data it's particular server machine can't responding.....

but gmail provide data therefore machine can't use restriction responding data......


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -