Spring Mail working but sudden "Got bad greeting from SMTP host" - java

This past week, my email service project has been working completely fine, but today when I try to run it in Eclipse it throws a:
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Got bad greeting from SMTP host: mail.test.com, port: 25, response: 554 mail.test.com
. Failed messages: javax.mail.MessagingException: Got bad greeting from SMTP host: mail.test.com, port: 25, response: 554 mail.test.com
What could be the sudden cause of this? Now, my SpringBoot main class won't end, I have to manually terminate it.

SMTP error 554 is kind of generic.
It usually means the remote host has decided it will not accept the message you are attempting to send (maybe because your sending server is blacklisted), and the rejection is permanent.
You need to talk to the admin on the receiving server (mail.test.com) to find out why your message is being rejected.

Related

Java.net.SocketException: Permission denied: connect in Pentaho Data Integration

I try to send an e-mail with the help of Pentaho, but something blocks my shipment. Can anyone help me? I get in the log:
2019/04/02 14:35:29 - Mail - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Problem while sending message: javax.mail.MessagingException: Could not connect to SMTP host: smtp..., port: 25;
nested exception is:
java.net.SocketException: Permission denied: connect
I have marked:
Use authentication? true
Use secure authentication? true
Secure connection type: TLS
There's a problem with connecting to the mail server. You need to either double check your connection info, or you need to configure your mail server to work with Pentaho. For example, if you're trying to use Pentaho with Gmail, you need to set Gmail to "allow connections from less secure applications".

Gmail account authentication error while sending mail in android application

I am getting following error when i am trying to send message from android application with gmailapi.
"Could not connect to SMTP host: relay.jangosmtp.net, port: 465, response: -1"
Since 2015 google is not allowing "less secure apps" to connect through their SMTP port (this means you need a ssl or tls certificate).
To allow them you could try this: https://support.google.com/accounts/answer/6010255?hl=en

SMTP client program gives run-time error

I can compile my code but not execute. What could be the reason and how should i sort itI get the following run-time errors.
C:\>java SMTPClient
Exception in thread "main" javax.mail.MessagingException: Could not connect to S
MTP host: smtp.mail.yahoo.com, port: 465;
nested exception is..................etc</b></code>
Please provide the root cause or Stack trace of the Exception.
It may be because you haven't configured Authenticator
probably SMTPClient uses a SMTP protocol, but yahoo uses more secure one like ASMTP. can you post your SMTPClient class here?
The JavaMail FAQ has instructions for connecting to Yahoo mail, as well as debugging tips for when it doesn't work.
The reason is that it cannot connect to the Yahoo Mail Server. I'm unsure of Yahoo's mail port so ensure that the port is correct. Can you post more details? I.e. the nested exception....

Could not connect to SMTP host: {remote-server}, port: {port}, response: -1

I am trying to send mail using java mail api. But exception is come to me with above
message.
Could not connect to SMTP host: {remote-server}, port: {port}, response: -1
What`s mean "response : -1"
I can`t found this code in api manual.
A response code of -1 means that JavaMail failed to get a valid response code from the SMTP server. You can view the relevant source here.
Most likely, you either have your properties set incorrectly or you have a networking issue such as a firewall blocking the connection.
You might try enabling debug mode (session.setDebug(true)). Please post your code if you need further help.

GWT send mail in development mode mail server problem

I am trying to send a mail with gwt and java on the server with the buitin jetty on eclipse but I am getting the following error:
Cannot open and load mail server properties file.
Cannot send email. javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
does someone know what to configure to make it work??
This is not GWT related problem. Test you email sending code in isolation (without GWT and Jetty).
Start with sample code and configure it's parameters to your need. You will also need to use a SMTP server to send emails this way.

Categories