- In this Repository Show the Exmples of Related to Java-Mail-API and also Check Email exist of not that use by ThirdParty API call inside java Code Using HttpClient.
- javax.mail-1.6.0.jar Get from Here
- httpclient-4.3.1.wso2v1.jar Get from Here
- org-apache-commons-logging.jar Get from Here
- org.json.simple-0.4.jar Get from Here
- Setting in Email Account
- When We send mail using java-Mail-API then Send Person (TO) mail 2 step Authetication is OFF and Less-Secure APP is ON.
- About the 2 step Authentication and Less-Secure app Visit this Link : Here
- Requrinment Data for Send mail
- FROM email id and it's password. (With Above Setting)
- TO email id
- Properties Required for Read-Mail is below.
Properties properties = new Properties();
properties.put("mail.smtp.host", "smtp.gmail.com");
properties.put("mail.smtp.port", "587");
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true");
- Requrinment Data for Read mail
- FROM email id and it's password. (With Above Setting)
- TO email id
- Availability of UnRead mail In your INBOX folder.
- Properties Required for Read-Mail is below.
Properties props = System.getProperties();
props.setProperty("mail.store.protocol", "imaps");
- Requrinment Data for Fetch Attachment in the mail
- FROM email id and it's password. (With Above Setting)
- TO email id
- Availability of UnRead mail In your INBOX folder.
- Properties Required for Read-Mail is below.
Properties properties = System.getProperties();
properties.put("mail.pop3.host", "pop.gmail.com");
properties.put("mail.pop3.port", "995");
properties.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
properties.setProperty("mail.pop3.socketFactory.fallback", "false");
properties.setProperty("mail.pop3.socketFactory.port", String.valueOf("995"));
- Requrinment Data for Check Email-Exist mail
- API key of ThirdParty API.
- API key Get from here : Here
- Any mail Account.
- First Understand The 2 things
- What is MX Record Here
- Understand the Boolean Status smtp_check and mx_found