스트레치에서 최소 200 개의 메시지를 보내야합니다.클라이언트의 Javamail 속도를 초과했습니다
메시지 오류 :
com.sun.mail.smtp.SMTPSendFailedException: 421 4.4.2 Message submission rate for this client has exceeded the configured limit
내가 할 수있는 일 프로그램이 시작되면, 15 또는 17에 성공적으로 메일을 보내, 나는이 오류가?
CODE JAVA
public void mandarEmail(String correos, String mensaje, String asunto) {
Message message;
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.transport.protocol", "smtp");
props.setProperty("mail.smtp.port", "587");
props.put("mail.smtp.host", "pod51004.outlook.com");
props.put("mail.smtp.debug", "true");
Session session = Session.getInstance(props, new javax.mail.Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("[email protected]", "docpass");
}
});
try {
message = new MimeMessage(session);
message.setFrom(new InternetAddress("USMP - FN <[email protected]>"));
message.setSubject(asunto);
message.addRecipients(Message.RecipientType.TO, InternetAddress.parse(correos));
message.addRecipients(Message.RecipientType.BCC, new InternetAddress[]{new InternetAddress("[email protected]")});
message.setContent(mensaje, "text/html; charset=utf-8");
Transport transport = session.getTransport("smtp");
transport.connect("[email protected]", "docpass");
transport.sendMessage(message, message.getAllRecipients());
transport.close();
} catch (MessagingException e) {
throw new RuntimeException(e);
} finally {
props = null;
message = null;
}
}
너무 많은 메일을 한 번에 보내지 마십시오. 이 서버는 스팸 함을 알리는 서버입니다. –
그래서 ... 내가 뭘 할 수 있니? – Ivan
기본적으로 스팸을 중지합니다. 요금은 outlook.com의 한도를 초과하지 않도록 보내는 이메일을 제한합니다. –