Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 3.45 KB

File metadata and controls

74 lines (56 loc) · 3.45 KB

Email-Tutorial

  • 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.

Requires Dependency for This Repository.

  1. javax.mail-1.6.0.jar Get from Here
  2. httpclient-4.3.1.wso2v1.jar Get from Here
  3. org-apache-commons-logging.jar Get from Here
  4. org.json.simple-0.4.jar Get from Here
  1. 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
  2. Requrinment Data for Send mail
    • FROM email id and it's password. (With Above Setting)
    • TO email id
  3. 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");
  1. 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.
  2. Properties Required for Read-Mail is below.
        Properties props = System.getProperties();
        props.setProperty("mail.store.protocol", "imaps");
  1. 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.
  2. 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"));
  1. Requrinment Data for Check Email-Exist mail
    • API key of ThirdParty API.
    • API key Get from here : Here
    • Any mail Account.
  2. First Understand The 2 things

Contributor.

  1. welcome to all contributors who are curious about this project then, contribute in it.Kindly fork this project for add your programs. You can learn Git from Here and Here