{"id":222,"date":"2020-06-26T06:48:45","date_gmt":"2020-06-26T06:48:45","guid":{"rendered":"https:\/\/www.smtp-server.net\/?p=222"},"modified":"2020-06-14T09:01:50","modified_gmt":"2020-06-14T09:01:50","slug":"smtp-server-free-no-authentication-error-530-access-denied-free-users-cannot-access-this-server-in-java-mail","status":"publish","type":"post","link":"https:\/\/www.smtp-server.net\/pt\/smtp-server-free-no-authentication-error-530-access-denied-free-users-cannot-access-this-server-in-java-mail\/","title":{"rendered":"Servidor SMTP gratuito sem autentica\u00e7\u00e3o - Erro 530 Acesso negado: os utilizadores gratuitos n\u00e3o podem aceder a este servidor. No Java Mail?"},"content":{"rendered":"<h3>Erro 530 Acesso negado: os utilizadores livres n\u00e3o podem aceder a este servidor. no java mail? <\/h3>\n<p><strong>Erro 530 Acesso negado: os utilizadores livres n\u00e3o podem aceder a este servidor. em java mail? ... criei um programa em java utilizando a API de correio eletr\u00f3nico de java e agora, quando envio uma mensagem de correio eletr\u00f3nico, aparece o seguinte erro <\/p>\n<p>Exce\u00e7\u00e3o na thread \"main\" javax.mail.Authentication: 530 Acesso negado: Os utilizadores livres n\u00e3o podem aceder a este servidor.<\/p>\n<p>        em com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)<br \/>\n        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)<br \/>\n        em javax.mail.Service.connect(Service.java:313)<br \/>\n        em javax.mail.Service.connect(Service.java:172)<br \/>\n        em javax.mail.Service.connect(Service.java:121)<br \/>\n        em javax.mail.Transport.send0(Transport.java:190)<br \/>\n        em javax.mail.Transport.send(Transport.java:120)<br \/>\n        em SendApp_one.send(SendApp_one.java:36)<br \/>\n        em SendApp_one.main(SendApp_one.java:56)<\/p>\n<p>O meu c\u00f3digo fonte est\u00e1 abaixo:<\/p>\n<p>importar java.io.*;<br \/>\nimportar javax.mail.*;<br \/>\nimportar javax.mail.internet.*;<br \/>\nimportar javax.activation.*;<\/p>\n<p>classe p\u00fablica SendApp_one<br \/>\n {<\/p>\n<p>     private static final String SMTP_AUTH_USER =MyYahooUsename;<br \/>\n     private static final String SMTP_AUTH_PWD =Myyahoopassword;<\/p>\n<p>    public void send(String smtpHost,String from, String to,String subject, String content)<br \/>\n                throws AddressException, MessagingException<br \/>\n\t{<\/p>\n<p>        \/\/ Criar uma sess\u00e3o de correio eletr\u00f3nico<br \/>\n        java.util.Properties props = new java.util.Properties();<br \/>\n        props.put(\"mail.smtp.host\", smtpHost);<br \/>\n        props.put(\"mail.debug\", \"false\");<br \/>\n        props.put(\"mail.smtp.auth\", \"true\");<br \/>\n        Authenticator auth= new SMTPAuthenticator();<br \/>\n        Session session = Session.getInstance(props,auth);<br \/>\n        session.setDebug(true);<\/p>\n<p>        \/\/ Construir a mensagem<br \/>\n        Message msg = new MimeMessage(session);<br \/>\n        msg.setFrom(new InternetAddress(from));<br \/>\n        msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));<br \/>\n        msg.setSubject(subject);<br \/>\n        msg.setText(content);<\/p>\n<p>        \/\/ Enviar a mensagem<br \/>\n        Transport.send(msg);<br \/>\n        System.out.println(\"O correio eletr\u00f3nico foi enviado!...\");<br \/>\n    }<br \/>\n    private class SMTPAuthenticator extends javax.mail.Authenticator<br \/>\n    {<\/p>\n<p>        public PasswordAuthentication getPasswordAuthentication()<br \/>\n        {<br \/>\n          String username =SMTP_AUTH_USER;<br \/>\n          String password =SMTP_AUTH_PWD;<br \/>\n          return new PasswordAuthentication(nome de utilizador, palavra-passe);<br \/>\n        }<br \/>\n    }<\/p>\n<p>    public static void main(String[] args) throws Exception {<br \/>\n        \/\/ Enviar uma mensagem de teste<br \/>\n\t\tSendApp_one obj=new SendApp_one();<br \/>\n        String subject=new String(\"\"+args[0]);<br \/>\n       String text=new String(\"\"+args[1]);<br \/>\n        obj.send(\"smtp.mail.yahoo.com\", \"Yahooid\", \"YahooId\",subject,text);<br \/>\n    }<br \/>\n}<br \/>\npor favor, d\u00ea-me uma solu\u00e7\u00e3o por favor .........................<br \/>\nObrigado.....<\/strong><\/p>\n<p>O Yahoo n\u00e3o oferece o servi\u00e7o de correio SMTP e POP aos utilizadores de contas gratuitas. \u00c9 necess\u00e1rio comprar o servi\u00e7o Yahoo Mail PLUS. <\/p>\n<p>http:\/\/answers.yahoo.com\/question\/index?qid=20060918091416AAIyC6m<br \/>\nhttp:\/\/overview.mail.yahoo.com\/enhancements\/mailplus<\/p>\n<p>&#8212;<br \/>\nKasey C, guru do PC desde os tempos do Apple II<br \/>\nLembre-se sempre que \u00e9 \u00fanico, tal como todos os outros.<\/p>\n<p><!--more--><\/p>\n<p>Tive o mesmo problema durante alguns dias ao tentar enviar correio eletr\u00f3nico a partir do Opera Mail. Agora a minha configura\u00e7\u00e3o \u00e9 o servidor smtp.mail.yahoo.com na porta 465 e est\u00e1 a funcionar bem.<\/p>\n<p>Espero que ajude<br \/>\nS\u00e9rgio<\/p>\n<p>Isen\u00e7\u00e3o de responsabilidade - As opini\u00f5es expressas neste artigo s\u00e3o fornecidas por terceiros e podem n\u00e3o corresponder \u00e0s do nosso s\u00edtio Web<\/p>","protected":false},"excerpt":{"rendered":"<p>Error 530 Access denied : Free users cannot access this server. in java mail? Error 530 Access denied : Free users cannot access this server. in java mail? &#8230; i have made prog in java using java mail api now when i am send email it throws following error Exception in thread &quot;main&quot; javax.mail.Authentication: 530 <a href=\"https:\/\/www.smtp-server.net\/pt\/smtp-server-free-no-authentication-error-530-access-denied-free-users-cannot-access-this-server-in-java-mail\/\" rel=\"nofollow\"><span class=\"sr-only\">Read more about SMTP Server Free No Authentication &#8211; Error 530 Access Denied : Free Users Cannot Access This Server. In Java Mail?<\/span>[...]<\/a><\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","hentry","category-smtp-questions"],"_links":{"self":[{"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":1,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/posts\/222\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smtp-server.net\/pt\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}