网易的SMTP地址 是什么
smtp.163.com 不对吗??
Socket s=new Socket("smtp.163.com",25);
InputStream in=s.getInputStream();
OutputStream out=s.getOutputStream();
out1=new PrintWriter(out);
String hostName=InetAddress.getLocalHost().getHostName();
send("HELO "+hostName);
send("MAIL FROM: <"+"[email protected]"+">");
send("RCPT TO: <"+"[email protected]"+">");
send("DATA");
send(".");
send("hello i am iori");
s.close();
smtp.163.com 不对吗??
Socket s=new Socket("smtp.163.com",25);
InputStream in=s.getInputStream();
OutputStream out=s.getOutputStream();
out1=new PrintWriter(out);
String hostName=InetAddress.getLocalHost().getHostName();
send("HELO "+hostName);
send("MAIL FROM: <"+"[email protected]"+">");
send("RCPT TO: <"+"[email protected]"+">");
send("DATA");
send(".");
send("hello i am iori");
s.close();
不行吧?
用Socket发Email,首先要登录到系统的。