| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a Java application that sends an email notification to new registered user. This small project demonstrate how to use JavaMail to send an email and how to load email credentials form a .env file for added security.
Follow these instructions to set up and run the this project on your local machine.
mkdir javamail
cd javamail
git clone https://github.com/hemantDwivedi/java-mail-api.git
Or you can download and extract ZIP file.
SENDER_EMAIL=your_email@example.com
SENDER_PASSWORD=your_email_password
Replace your_email@example.com with your actual sender email and your_email_password with your actual sender email password.
Open a terminal or command prompt and navigate to the root directory of the project.
Compile the Java classes using the following command:
javac -cp lib/javax.mail.jar:lib/activation.jar src/main/java/com/email/Main.java
java -cp .:lib/javax.mail.jar:lib/activation.jar src/main/java/com/email/Main
Please keep the .env file secure and do not share it publicly or include it in version control systems.
This project is for demonstration purposes and lacks proper error handling and security features. In a production environment, use environment variables or other secure methods to manage sensitive configuration.
| Back | FazBrowse Home | New Git URL |