问题
I am having a website written in JAVA SPRING and HIBERNATE. I want to integrate gmail as apart of my website where my logged in users can use their gmail within my website. How can i do this?
Is there any way to create any mail server instead using gmail?
Anyway my aim is to send and receive mails within the logged in users, it will be helpful if that is achieved by gmail coz everything is cool there.
回答1:
In order to do that, you need to follow the documentation for OAUTH2 at google.
https://developers.google.com/gmail/xoauth2_protocol
Once you have access to their account, you can send and receive mail on their behalf. Getting users to grant you access to their accounts will be a challenge.
回答2:
The JavaMail FAQ has instructions for using Gmail.
回答3:
Since you have mentioned Spring, I assume you need a Spring bean that can send emails from within your project.
Check this - http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mail.html
来源:https://stackoverflow.com/questions/38159384/i-want-to-use-gmail-within-my-website-to-send-and-receive-mails-how-can-i-achie