While trying to use
Transport.send(message, addresses); or transport.sendMessage(message, message.getAllRecipients());
while sending mail using java, the process never ends only when I provide wrong password for my attachment file.
Tried some solutions from below links but does not help:
Link 1:
Link 2:
Interestingly, process hangs only when I am providing wrong password for the attachment. While it works when I provide correct password for the attachment. Attached file is from SFTP server.
Using gmail SMTP account to send an email:
Server domain: smtp.gmail.com
Port: 465
Secure Connection: SSL
Anyone having any thoughts will be appreciated.
Related
When I run my application locally, everything works correct, mails are sent, but I deployed my application to aws EC2 and I get this:
org.springframework.mail.MailAuthenticationException: Authentication failed;
I have less secure apps turned off on my gmail account I send emails from, the two steps verification is also turned off. As I said, everything was working before I deployed the app to aws.
Properties:
mail:
host: smtp.gmail.com
username: <my.mail>#gmail.com
password: <my.password>
port: 587
protocol: smtp
properties:
mail.smtps.auth: true
mail.smtp.starttls.enable: true
mail.smtp.ssl.trust: smtp.gmail.com
Am I missing any property or something like this?
This looks like duplicate from:
javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1
Ok, I finally solved this. The problem is that google blocks EC2 ports so what I needed to do was to turn on 2 steps verification in my google account -> then create new password (option under setting 2 steps verification) -> set this password in my .yml file as the new one -> everything works
I also set the SMTP rules in my EC2 security groups but I am not sure if it had any impact or the steps I have descripted above are enough
I configured Apache James server in my local machine then added domains & user and then configured it in thunderbird.
Then I tried to send an email from Gmail to apache James server and I am facing below issue like,
Sometimes mail sent successfully from Gmail to the James server, but sometimes it's failed to send an email.
I am getting this error in Gmail: Address not found Your message wasn't delivered to [email address] because the address couldn't be found, or is unable to receive mail.
The response from the remote server was: 550 5.1.1 [email address] Recipient not found.
Anyone please help me on this issue?
Thanks!
Try to open access for dangerous apps on myaccount.google.com/lesssecureapps
I am new in BIM Server , trying to figure out how BIM server and IFC model sync together.
I made connectivity to local BIM-server from a java application. I use the default settings as described in https://github.com/opensourceBIM/BIMserver/wiki/Setup .
Now, when I am going to create a new user it only ask for mail address , username and Access level. No password field . So, I can not do log in using that user.
"Send Password Reset" is giving the following error :
" Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused: connect) " .
Whether it is a BIM server version problem or I am missing something ?
I have not found any well prepared Documentation or tutorial on BIM server. My goal is to check how the BIM server can replace the ftp server that we are using now to store IFC files.
Thanks in advance
-Nazar-E-Bukhari
I have posted this in BIM server Issues. I am posting the answer if someone is also searching for the same solution.
"It's really bad practice to have an administrator set the user's passwords. How is the administrator going to give the passwords to those users? (I agree with him, but as because I am testing it in my localhost, I have no mail server configured)
Setup a working e-mail server, or better yet, use a third party's server. For example have a look at mailgun, sendgrid or postmark."
I am using :
transport.connect(getHost(), getPort(), getUsername(), getPassword());
to send email, but it always gives me the following exception:
class com.sun.mail.smtp.SMTPAddressFailedException: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.
But actually I have provided the username and password above, and the username and password is right as I tested in thunderbird, it can send email well.
So what's my problem ? Please point me the right direction. Thanks
When creating the javax.mail.Session, be sure the given properties contain:
props.put("mail.smtp.auth", "true");
http://www.oracle.com/technetwork/java/javamail/faq/index.html#smtpauth
I think that you need to talk to the administrators of the mail server to see what is going on. You might be using the wrong port for instance. Or there might be some local policy that you need to observe ...
Username: xxxxx.#hotmail.com
Password: yyyyyyyy
Pop3: pop3.live.com Port: 995 SSL: TRUE
SMTP: smtp.live.com Port: 587 SSL: TRUE (Port: 25 also not working)
These are the details I gave: POP3 settings accepted and SMTP settings throw Exception:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
I got this Exception when I try to send a mail via Java Coding.
Can any one help me for correct SMTP settings which will works to send mail.
I have Send mail using Gmail and Yahoo.
To my knowledge you only use their incoming address. For outgoing to need to use a local/private/alternate SMTP server.
I check my incoming mail on a Live account through pop3.live.com and send out through mail.{myworkdomain}.com.au