Comments (4)
Hey @mrcleanandfresh It's usually better to create a new issue, since this is one is closed.
To your problem, if you look in the codebase, the email properties are provided in the application.properties file so Spring Boot can pick them up automatically, and they are of the form spring.mail.host, spring.mail.port and so on. Can you try replacing those values with your own and let me know if it works?
Also let me know why you think you should have an email.properties file with the properties you listed so we can correct that.
Cheers,
Loredana
from spring-security-registration.
Well, @CoolR7 - that's not going to be possible. SMTP credentials are naturally user-specific, so I can't commit my own Gmail credentials here :)
What I would say is - Gmail is just one option - there are many available email solutions out there, all providing simple SMTP credentials. So - you might want to have a look at Amazon SES for example, or SendGrid.
Hope that helps.
Cheers,
Eugen.
from spring-security-registration.
I get this same error using the FakeSMTP (fakeSMTP-2.1-SNAPSHOT.jar) server on a fresh clone: 02-24-2018. Everything else works awesomely, I just can't go through the flow of using the verification token. Here's the stack trace I am getting after the RegistrationListener#confirmRegistration()
method fires:
o.s.m.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535 AUTH failed
at o.s.m.j.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:424)
at o.s.m.j.JavaMailSenderImpl.send(JavaMailSenderImpl.java:307)
at o.s.m.j.JavaMailSenderImpl.send(JavaMailSenderImpl.java:296)
at o.b.r.l.RegistrationListener.confirmRegistration(RegistrationListener.java:43)
at o.b.r.l.RegistrationListener.onApplicationEvent(RegistrationListener.java:34)
... 89 frames truncated
Caused by: j.m.AuthenticationFailedException: 535 AUTH failed
at c.s.m.s.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:932)
at c.s.m.s.SMTPTransport.authenticate(SMTPTransport.java:843)
at c.s.m.s.SMTPTransport.protocolConnect(SMTPTransport.java:748)
at j.m.Service.connect(Service.java:366)
at o.s.m.j.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:501)
... 1 frames truncated
... 93 common frames omitted
email.properties:
smtp.host=localhost
smtp.port=2525
smtp.protocol=smtp
smtp.username=test
smtp.password=test
I'm running the FakeSMTP server on port 2525.
I was also getting this same error with SES, and my domain's SMTP email. So I used FakeSMTP to check to troubleshoot further. I'm almost certain it's something I am doing wrong, since I went through this tutorial to learn about how to register users and manage them. Any help would be appreciated.
from spring-security-registration.
Thanks @lor6, my apologies, I thought since it was the same issue it would have been redundant. I changed the properties in application.properties and it worked! Thanks. I had thought it was weird that in troubleshooting using Google that spring mail was listed like spring.mail.host, etc and the email.properties file wasn't.
Anyway, there are two files called email.properties.sample
and email.properties.sample.localhost
and in them it says to rename them from .sample
to email.properties
. Here's the comment in the localhost one:
################### JavaMail Configuration ##########################
# To setup a local smtp server for testing, do the following:
#
# Rename this file to email.properties
# Download FakeSMTP
# git clone https://github.com/Nilhcem/FakeSMTP
# cd FakeSMTP
# mvn compile package
# Start the fakeSMTP server on port 2525
# java -jar target/fakeSMTP-*.jar
from spring-security-registration.
Related Issues (20)
- Update the code in article spring-security-block-brute-force-authentication-attempts HOT 1
- error in registration process HOT 1
- Broken code in UserService.java HOT 3
- About security : HTTP 2 instead of HTTP 1.1 HOT 1
- MFA keeps failing: totp validation always returns false HOT 2
- When update all POM dependecies? HOT 2
- Login form submits to unexisting action HOT 3
- Runtime error due to rest-assured dependency HOT 3
- Unable to do API test with Rest Assured API framework- Getting below error - Not sure what is the issue HOT 2
- Failing tests HOT 1
- wont run after packaging war
- Make LoggedUser serializable or don't store it in the session. HOT 2
- Unable to resolve JDBC type code for column `roles.users` HOT 2
- MyLogoutSuccessHandler needs (to extend) SimpleUrlLogoutSuccessHandler HOT 1
- A successful login shouldn't reset the attempt counter HOT 2
- Full courses refund
- Spring Boot 3.0 Migration HOT 1
- Application does not run when deployed to web container (Liberty as an example) HOT 1
- unable to start this application with mysql HOT 2
- Linux io problem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-security-registration.