口口口关于hotmail邮箱发送信息的小问题
写了小程序测试一下能否从hotmail邮箱发送到qq邮箱结果是可以从qq->hotmail,却不能从hotmail->qq
小弟求高手解惑
package cn.ch.javamail1;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class Demo1 {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
Properties props = new Properties();
props.setProperty("mail.smtp.auth", "true");
props.setProperty("mail.transport.protocol","smtp");
Session session = Session.getInstance(props);
session.setDebug(true);
Message msg = new MimeMessage(session);
msg.setText("hello");
msg.setFrom(new InternetAddress("abcd@hotmail.com"));//A
//msg.setFrom(new InternetAddress("12345678@qq.com"));
Transport transport = session.getTransport();
transport.connect("smtp.live.com",25,"username","password");//A处的username password
transport.sendMessage(msg,new Address[]{new InternetAddress("12345678@qq.com")});
//transport.sendMessage(msg,new Address[]{new InternetAddress("abcd@hotmail.com")});
transport.close();
}
}
--------------------编程问答-------------------- 现在HOTMAIL有SMTP方式发信吗?
记得以前只有WEBDAV的,我去hotmail看看... --------------------编程问答-------------------- 逛了一圈HOTMAIL,木有找到有SMTP发信的设置...
以LIVE客户端来说,依然是走HTTP
这个是HOTMAIL的协议流地址
http://mail.services.live.com/DeltaSync_v2.0.0/sync.aspx
补充:Java , Web 开发