https://github.com/hellokoding/sendingmail-gmailsmtpserver-javamailapi
Sending Mail through Gmail SMTP Server with Java Mail API
https://github.com/hellokoding/sendingmail-gmailsmtpserver-javamailapi
javamail-api sendmail-smtp
Last synced: about 1 month ago
JSON representation
Sending Mail through Gmail SMTP Server with Java Mail API
- Host: GitHub
- URL: https://github.com/hellokoding/sendingmail-gmailsmtpserver-javamailapi
- Owner: hellokoding
- Created: 2017-12-18T08:21:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-19T14:56:18.000Z (over 7 years ago)
- Last Synced: 2025-01-19T13:15:27.317Z (3 months ago)
- Topics: javamail-api, sendmail-smtp
- Language: Java
- Homepage: https://hellokoding.com/sending-email-through-gmail-smtp-server-with-java-mail-api-and-oauth-2-authorization/
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sending Email Through Gmail SMTP Server with Java Mail API and OAuth 2 Authorization
## Guide
https://hellokoding.com/sending-email-through-gmail-smtp-server-with-java-mail-api-and-oauth-2-authorization/## What you'll need
- JDK 1.7+
- Maven 3+
- OAuth Access Token of your Google Account. Check out more details on How to get the access token at [OAuth2DotPyRunThrough](https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough)## Stack
- Java Mail API
- OAuth2 Authorization Flow## Run
`mvn clean package exec:java -Dexec.args="{FROM_USER_NAME} {FROM_USER_FULLNAME} {FROM_USER_ACCESSTOKEN} {TO_USER_EMAIL}"`