...
Info |
---|
If you are trying to configure your Gmail account, you can find the IP-Address/Host Name, Port, Security Type information by following either of the two ways : Following the below steps : Link : https://support.google.com/mail/answer/7126229?hl=en&visit_id=637256414356189534-3292911035&rd=2 If you are still unable to access your account, please follow the link : https://support.google.com/a/answer/6260879?hl=en |
In case If you are using a gmail account, please make sure to switch ON the Less secure app access. (Navigate to Manage your Google account > Security)
...
Office365, please use the below details :
IMAP | Host Name : outlook.office365.com Port : 143 or 993 Encryption method : SSL |
SMTP | Host Name : smtp.office365.com Port : 587 Encryption method : TLS |
POP3 | Host Name : outlook.office365.com Port : 110 or 995 Encryption method : SSL |
Also, if you are using java version 291, you might encounter error “Could not connect to mail server with given credentials, Please validate“ with keyword ‘setMailConnection’.
As per JDK 8u291 Update Release Notes :
TLS 1.0 and 1.1 are versions of the TLS protocol that are no longer considered secure and have been superseded by more secure and modern versions (TLS 1.2 and 1.3)
These versions have now been disabled by default. If you encounter issues, you can, at your own risk, re-enable the versions by removing "TLSv1" and/or "TLSv1.1" from the jdk.tls.disabledAlgorithms security property in the java.security configuration file.
Watch a video :
This video displays how to create a mail connection and use it in a test case.
...