Java app to send and track email
This app is built on Spring Boot 3.0.4 and Gradle-Kotlin and is generated from https://start.spring.io/
- Install OpenJDK 17
- Install Redis (Optionally use a Redis Client, example - Red for Mac)
-
Clone this repository
-
Set up your Gmail password to be used by this app here - https://myaccount.google.com/apppasswords
-
Store your google creds in Redis using this command -> HMSET EmailAccount id “admin” emailId "your-email-id" appPwd "your-app-password”
-
Build and run the spring boot app
-
Use this curl to send email
curl --location 'http://localhost:8080/email/send' \ --header 'Content-Type: application/json' \ --data-raw '{"subject":"test mail","content":"this is a test email","toAddress":"xx@yy.com"}
-
Tracker API is called from email client (localhost calls are only made from email clients like Outlook and Mail on Mac, it will not be called from browsers)