send email using java
send email by using https://mvnrepository.com/artifact/javax.mail/mail/1.4.7 API
Run
- goto src/main/java/com/config file
- change yourID@gmail.com to your gmail ID and "*******" to your gmail Password
- go to application directory
- fire command: ./gradlew bootrun
Example:
- curl -H "Content-Type: application/json" -X POST -d '{"to":"receiverID@gmail.com","subject":"your subject","data":"your message"}' http://localhost:8080/api/send