String host = "pop.263.net";

解决方案 »

  1.   

    263服务器的IP(既263.net)不是指向邮件服务器的,你要找到pop.263.net的IP就可以了,我提供一个202.96.44.24。将String host = "263.net";
    改为
    String host = "202.96.44.24";
    我的得分很少的,好了后记得给分哦 :)
      

  2.   

    为了这分,编了一个发的看看:package com.juan.mail;import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.*;
    /**
     * Insert the type's description here.
     * Creation date: (2002-3-19 10:30:42)
     * @author: Tiger
     */
    public class Test { /**
     * Constructor for Test.
     */
    public Test() {
    super();
    } public static void main(String[] args) {
    try {
    Properties props = new Properties();

    Session sendMailSession;
    Store store;
    Transport transport;
    sendMailSession = Session.getInstance(props, null);

    props.put("mail.smtp.host", "202.108.255.203");
    props.put("mail.smtp.auth", "true"); 

    Message newMessage = new MimeMessage(sendMailSession);
    newMessage.setFrom(new InternetAddress("[email protected]"));
    newMessage.setRecipient(
    Message.RecipientType.TO,
    new InternetAddress("[email protected]"));
    newMessage.setSubject("subject1");

    newMessage.setSentDate(new Date());

    newMessage.setText("text");

    transport = sendMailSession.getTransport("smtp");
    newMessage.saveChanges();
    transport.connect("202.108.255.203", "user", "password");
    transport.sendMessage(
    newMessage,
    newMessage.getRecipients(Message.RecipientType.TO));

    transport.close();
    } catch (SendFailedException e) {
    System.out.println(e.toString());
    } catch (MessagingException m) {
    System.out.println(m.toString());
    }
    }
    }
      

  3.   

    偶真的要晕了!
    我是问发的
    为了表示诚意 
    帮我解决这个问题的同志 
    我将将此贴的100分加上
    http://www.csdn.net/Expert/TopicView1.asp?id=587830
    的一百分 一起奉送!
    只求大家能帮我看看为什么
      

  4.   

    你的程序没问题,可能是你用的包有问题,感到很奇怪,你明明用的是javax的那个包,为啥会出现sun那个包的错误????
      

  5.   

    那你的建议是什么?我有去下了javamail1.13加上了 也不行
      

  6.   

    没仔细看过JavaMail,不过API说你这个是由于这个message已经被删掉了,所以用getFrom方法会出现这个错误。觉得你应该先检查isExpunged()标志,如果是true,就不能显示了。
      

  7.   

    嗨!
    你的程序没错误,一切正常。我建议你不要把程序放在桌面,JAVA处理中文目录好象不是很好。再试一试。
      

  8.   

    呵呵 
    真是大faint!
    原来真的是信件出问题了!
    jimjxr(宝宝猫)谢谢了!
    马上给你加上分
    请到http://www.csdn.net/Expert/TopicView1.asp?id=587830
    还有100分赠送 呵呵