去网上找个mail服务器,很多的,安装后,配制SMTP,注册几个账号,就可以测试了。

解决方案 »

  1.   

    发的时候肯定要设置发的服务器地址
    比如从l63.com->21cn.com必需要设置smtp.163.com以及你的帐号和密码
      

  2.   

    我现在是这样设置的(用了javabean):Bean1.setHost("smtp.163.com");
    Bean1.setTo("[email protected]");
    Bean1.setFrom("[email protected]");
    Bean1.setSubject("password");
    Bean1.setBody("your pw is 123456");
    Bean1.send();请问应该在哪里设置账号和密码?在javabean里面该怎样写呢?
      

  3.   

    http://expert.csdn.net/Expert/topic/1197/1197493.xml?temp=.2968256
      

  4.   

    运行时tomcat信息如下:
    DEBUG:setDebug:JavaMail version 1.3
    errorIllegal whitespace in address请问是什么意思呢?我检查过服务器和邮件地址,似乎没有什么问题。
      

  5.   

    1.连接
    Properties props = System.getProperties(); // Get a Session object
    Session session = Session.getDefaultInstance(props, null); transport = session.getTransport("smtp"); transport.connect(mailhost, "用户名", "密码");
    2.转换地址
    msg = new MimeMessage(session);
    msg.setRecipients(
    Message.RecipientType.TO,
    InternetAddress.parse(mailInfo.getTo(), false));
      

  6.   

    也可以用CMail架一个邮件服务器。
      

  7.   

    Try the James,download from http://james.apache.org.The Java Apache Mail Enterprise Server (a.k.a. Apache James) is a 100% pure Java SMTP and POP3 Mail server and NNTP News server designed to be a complete and portable enterprise mail engine solution based on currently available open protocols.