This post walks you through the steps of Sending Mail With Amazon SES SMTP and Java API.

What you'll need

Stack

  • Java Mail API
  • AWS SES

Project structure

├── src
│   └── main
│       └── java
│           └── com
│               └── hellokoding
│                   └── mail
│                       ├── Main.java
│                       └── SendingMailThroughAWSSESSMTPServer.java
└── pom.xml

Project dependencies


Sending Mail


Run


Replace below macros with your respective values and run the command

mvn clean package exec:java -Dexec.args="{SMTP_USER_NAME} {SMTP_USER_PASSWORD} {FROM_USER_EMAIL} {FROM_USER_FULLNAME} {TO_USER_EMAIL}"  

Source code

[email protected]:hellokoding/sendingmail-aws-sessmtpserver-javamailapi.git

https://github.com/hellokoding/sendingmail-aws-sessmtpserver-javamailapi