JavaMail
希望大家踊跃help meProperties 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("asodjojasdo");
msg.setFrom(new InternetAddress("lili@));
Transport transport = session.getTransport();
transport.connect("smtp., 25, "moment52", "guardian");
transport.send(msg,new Address[]{new InternetAddress("314089597@)});
transport.close();
代码是跟视频抄的,视频可以,我这却不可以,开始是报帐号或密码错误修改后却变成现在这,对于英文差的我完全看不懂,希望得到大家的帮助
这是错误的显示:
235 Authentication successful
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
[ 本帖最后由 lovemm 于 2010-3-23 13:08 编辑 ]