SMTP Server Free No Authentication - Error 530 Access Denied : Free Users Cannot Access This Server.在 Java 邮件中?

错误 530 拒绝访问:自由用户无法访问此服务器。

错误 530 拒绝访问:自由用户无法访问此服务器。 ... 我使用 java mail api 用 java 制作了程序,现在发送电子邮件时出现以下错误

主线程 javax.mail.Authentication 中出现异常:530 拒绝访问:自由用户无法访问此服务器。.

at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at SendApp_one.send(SendApp_one.java:36)
at SendApp_one.main(SendApp_one.java:56)

我的源代码如下:

import java.io.*;;
导入 javax.mail.*;;
导入 javax.mail.internet.*;;
导入 javax.activation.*;;

公共类 SendApp_one
{

private static final String SMTP_AUTH_USER =MyYahooUsename;;
private static final String SMTP_AUTH_PWD =Myyahoopassword;;

public void send(String smtpHost,String from, String to,String subject, String content)
抛出地址异常、消息异常
{

// 创建邮件会话
java.util.Properties props = new java.util.Properties();;
props.put("mail.smtp.host", smtpHost);;
props.put("mail.debug","false");;
props.put("mail.smtp.auth", "true");;
Authenticator auth= new SMTPAuthenticator();;
会话 session = Session.getInstance(props,auth);;
session.setDebug(true);;

// 构建信息
Message msg = new MimeMessage(session);;
msg.setFrom(new InternetAddress(from));;
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));;
msg.setSubject(subject);;
msg.setText(content);;

// 发送信息
Transport.send(msg);;
System.out.println("Email Has Been Send !...");;
}
私有类 SMTPAuthenticator 扩展 javax.mail.Authenticator
{

公共密码验证 getPasswordAuthentication()
{
字符串 username =SMTP_AUTH_USER;;
字符串密码 =SMTP_AUTH_PWD;;
return new PasswordAuthentication(username, password);;
}
}

public static void main(String[] args) throws Exception {
// 发送测试信息
SendApp_one obj=new SendApp_one();;
String subject=new String(""+args[0]);;
String text=new String(""+args[1]);;
obj.send("smtp.mail.yahoo.com", "Yahooid", "YahooId",subject,text);;
}
}
plz give me solution plz .........................
谢谢.....

雅虎不向免费帐户用户提供 SMTP 和 POP 邮件服务。您需要购买 Yahoo Mail PLUS 服务。.

http://answers.yahoo.com/question/index?qid=20060918091416AAIyC6m
http://overview.mail.yahoo.com/enhancements/mailplus

-
卡西-C,从苹果 II 时代起就是个人电脑大师
永远记住你是独一无二的,就像其他人一样。.

几天来,我在尝试用 Opera Mail 发送电子邮件时遇到了同样的问题。现在我的配置是服务器 smtp.mail.yahoo.com,端口是 465,运行正常。.

希望对您有所帮助
塞尔吉奥

免责声明--本文所表达的观点由第三方提供,可能与本网站的观点不一致

众所周知,拥有一个可靠的 SMTP 服务器是正确发送电子邮件的关键。同样众所周知的是,没有人再提供不带验证或开放式中继的 SMTP 服务。但你仍然可以免费获得一个高质量的 SMTP 服务器供你使用!

单击此处获取免费 SMTP 服务器