GithubHelp home page GithubHelp logo

Comments (4)

lor6 avatar lor6 commented on May 30, 2024 1

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.

eugenp avatar eugenp commented on May 30, 2024

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.

mrcleanandfresh avatar mrcleanandfresh commented on May 30, 2024

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.

mrcleanandfresh avatar mrcleanandfresh commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.