0
votes

I am getting Javax.mail.messagingexception : could not connect to SMTP host : hostname port : 25 response : 552

Sometime mail is sent successfully. But sometime I get this exception.

I am not clear that why this is happening. If any thing goes wrong then no mail should be sent. But the exception still happens sometimes.

javax.mail.MessagingException: Could not connect to SMTP host: mail.mydomain.com, port: 25, response: 552 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:297) at javax.mail.Service.connect(Service.java:156) at javax.mail.Service.connect(Service.java:105) at javax.mail.Transport.send0(Transport.java:168) at javax.mail.Transport.send(Transport.java:98) at com.winit.magicbricks.businessLayer.CommonFunctions$1.run(CommonFunctions.java:1065) at java.lang.Thread.run(Unknown Source)

1

1 Answers

0
votes

provide the complete error log.. 552 is a generic response code it could be that either you are spamming or the recipients mailbox is full.

You should try adding DKIM signature to your mails and SPF record entry for your domain