Git Product home page Git Product logo

emailapplication's Introduction

Project Title:

Java Email Application

1. Project Description:

Using JavaMail API to send emails using SMTP from Java applications:

  1. without authentication,
  2. with TLS Authentication,
  3. with SSL Authentication and Email attachment and image.

2. Tech Stack:

  • Java 9
  • JavaMail API
  • Gmail SMTP server

3. Installing:

i. Clone the git repo

https://github.com/Vedantu18/EmailApplication.git

ii. Open project folder

iii. Explore

😎

4. How To Use:

To send emails:

  1. without authentication -> Run in IDE -> src/main/java/com/application/SimpleEmail.java,
  2. with TLS Authentication -> Run in IDE -> src/main/java/com/application/TLSEmail.java,
  3. with SSL Authentication and Email attachment and image Run in IDE -> src/main/java/com/application/SSLEmail.java.

5. JavaMail API Troubleshooting Tips:

  1. java.net.UnknownHostException comes when your system is not able to resolve the IP address for the SMTP server, it might be wrong or not accessible from your network. For example, GMail SMTP server is smtp.gmail.com and if I use smtp.google.com, I will get this exception. If the hostname is correct, try to ping the server through command line to make sure it’s accessible from your system.

Screenshot 2023-01-08 at 08-49-37 JavaMail Example - Send Mail in Java using SMTP DigitalOcean

  1. If your program is stuck in Transport send() method call, check that SMTP port is correct. If it’s correct then use telnet to verify that it’s accessible from you machine, you will get output like below.

Screenshot 2023-01-08 at 08-49-10 JavaMail Example - Send Mail in Java using SMTP DigitalOcean

6. Contributing:

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

7. Original Creator:

Author: Pankaj (Developer and author at DigitalOcean)

Tutorial Title: JavaMail Example - Send Mail in Java using SMTP

Tutorial URL: https://www.digitalocean.com/community/tutorials/javamail-example-send-mail-in-java-smtp

Date: July 4, 2024

emailapplication's People

Contributors

vedantu18 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.