javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?我程序代码:DataInputStream dis = new DataInputStream(request.getInputStream()) ;String send = dis.readUTF() ;String subje

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 21:54:14
javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?我程序代码:DataInputStream dis = new DataInputStream(request.getInputStream()) ;String send = dis.readUTF() ;String subje
xUoFWV~(BEz*(Miwm$]sVHDBBVHUKDRT&Zdc{vfq^aǵxW?\ NLOO!5 r 91e0ҮrOZuǗ+ּEsRѰ/^՚54Y:| ;a/y|GRwlQy'`WfE-\ǂ _T@Pq.G1J @+Ieױ-0RB9BNXiD[!~v+Vlݓg݃k\^fQ|-( Z\OpY98<

javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?我程序代码:DataInputStream dis = new DataInputStream(request.getInputStream()) ;String send = dis.readUTF() ;String subje
javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?
我程序代码:
DataInputStream dis = new DataInputStream(request.getInputStream()) ;
String send = dis.readUTF() ;
String subject = dis.readUTF();
String content = dis.readUTF() ;
System.out.println(send+" -- "+subject+" -- "+content);
try {
Properties props = System.getProperties() ;
props.put("mail.smtp.host",host);
Session session = Session.getDefaultInstance(props,new MyAuthenticator()) ;
MimeMessage message = new MimeMessage(session) ;
message.setFrom(new InternetAddress(from)) ;
message.addRecipient(Message.RecipientType.TO,new
InternetAddress(send));
message.setSubject(subject) ;
message.setText(content) ;
Store store = session.getStore("pop3") ;
store.connect("pop3.163.com","****","****");
Transport.send(message) ;
} catch (Exception e) {
e.printStackTrace();
} finally{
dis.close() ;
}

javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?我程序代码:DataInputStream dis = new DataInputStream(request.getInputStream()) ;String send = dis.readUTF() ;String subje
这是javamail的验证方法中的一种
改写Authenticator的getPasswordAuthentication()方法
private class Authenticator extends javax.mail.Authenticator
{
public PasswordAuthentication getPasswordAuthentication()
{
String un = user;
String pw = password;
return new PasswordAuthentication(un,pw);
}
}
应用这个之前需要设置
props.put( "mail.smtp.auth ","true ");
然后
Authenticator auth = new Authenticator();
Session mailSession = Session.getInstance(props,auth);
还有一种方法是在Transport中设置
Transport transport = mailSession.getTransport( "smtp ");
transport.connect( "mail.smtp.auth ","username ","password ");
transport.sendMessage(mimeMsg,maillist);
transport.close();
* sorze
* sorze
* 等级:
transport.connect( "mail.smtp.auth ","username ","password "); “mail.smtp.auth”应改为"smtp.163.com"或者类似的,其实写成这样就可以了transport.connect( "username ","password "); mail.smtp.host在propperties中就设置了

new Address[]()那里报The left-hand side of an assignment must be a variable错误、package com.sxt.mail;import java.util.Properties;import javax.mail.Address;import javax.mail.Message;import javax.mail.Session;import javax.mail.Transport;import j over-arching messaging是什么意思? import javax.swing.*;的javax是什么意思 import javax.swing.import javax.swing.event. please help translate the following again into ChineseIn the quest for visitors,and the advertising revenues they bring,the big portals have rolled out inducement after inducement,from instant messaging,e-mail and web telephony to picture-sharing,gam mail javax.mail.MessagingException:553 authentication is required,smtp2,DNGowLBbuQPU2mFIeZiQBw==.59922S2 1214372564 什么毛病?我程序代码:DataInputStream dis = new DataInputStream(request.getInputStream()) ;String send = dis.readUTF() ;String subje public boolean senderEmail(List list,MailMessage message) {// javax.mail.Address a=new InternetAddress();// 截取出发件箱的服务器String form = message.getFromEmail();// 得到@的索引int index = form.indexOf('@');// 得到字符串长度in import javax.swing.JToolBar是什么 import javax.swing.JScrollPane是什么 instant messaging用英文解释一下,急, 请帮我完成2篇阅读理解,Why is it that the more connected we get,the more disconnected I feel?Every advance in communications technology is a step back from the closeness of human interaction.With e-mail and instant messaging over the Interne The import javax.swing is never used 求解释import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; javax.servlet.jsp.JspException cannot be resolved to a type javax.servlet.jsp.PageContext cannot be servletpackage servlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.RequestDispatcher;import javax.servlet.ServletException;import java.io.*;impo java 中import javax.swing.JOptionPane;什么意思 java.lang.NullPointerException at javax.swing.ImageIcon.(Unknown Source)