Closed ythrinathareddy closed 7 months ago
Hi @ythrinathareddy , does it work if you switch the grails.mail.props.xxxx
properties with the following?
grails.mail.props=["mail.smtp.starttls.enable":"true","mail.smtp.auth":"true"]
IIRC you need to define the port another time in grails props
Either in this format :
grails.mail.props.mail.smtp.port=587
grails.mail.props.mail.smtp.starttls.enable=true
grails.mail.props.mail.smtp.auth=true
Or the grails.mail.props=[ ... ] given by @ahormazabal . In this case, "587" will be as a string
@ahormazabal & @Daryes thank you for reply. I used below setting it is working fine. and it running grails.mail.host=smtp.gmail.com grails.mail.username=main@gmail.com grails.mail.port=587 grails.mail.password=cbbjgytdvjgdfdgf # Use your app password here
grails.mail.props = ["mail.smtp.starttls.enable":"true","mail.smtp.auth":"true","mail.smtp.socketFactory.port":"587","mail.smtp.socketFactory.fallback":"false"] grails.mail.default.from = "main@gmail.com"
thank you all
_Note: Mail Authentication issue
Describe the bug I am setting up the mail notification for success and failure of job, bu using https://docs.rundeck.com/docs/administration/configuration/email-settings.html and after running job the mail is failing with authentication issue. as per detail i used both plain password and app password authentication. both are not working. below is my property file. can any one tell me anything i missed.
My Rundeck detail
To Reproduce
server log output
==> /var/log/rundeck/service.log <== at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] [2024-03-29T21:52:25,968] ERROR services.ExecutionUtilService - Execution failed: 159 in project automation: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [192.168.1.13: Unknown: Remote command failed with exit status 1 + {dataContext=MultiDataContextImpl(map={ContextView(node:192.168.1.13)=BaseDataContext{{exec={exitCode=0}}}, ContextView(step:1, node:192.168.1.13)=BaseDataContext{{exec={exitCode=0}}}}, base=null)} ]}, Node failures: {192.168.1.13=[Unknown: Remote command failed with exit status 1 + {dataContext=MultiDataContextImpl(map={ContextView(node:192.168.1.13)=BaseDataContext{{exec={exitCode=0}}}, ContextView(step:1, node:192.168.1.13)=BaseDataContext{{exec={exitCode=0}}}}, base=null)} ]}, status: failed] [2024-03-29T21:52:31,067] ERROR services.NotificationService - Error sending notification email to ytreddy123@gmail.com for Execution 159: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8
[2024-03-29T21:52:33,733] ERROR services.NotificationService - Error sending notification email to ytreddy123@gmail.com for Execution 159: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8
[2024-03-30T08:07:49,856] DEBUG authentication.GrailsUsernamePasswordAuthenticationFilter - Set SecurityContextHolder to JaasAuthenticationToken [Principal=admin, Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=192.168.1.12, SessionId=node0bwxd5qhrdxmot9l5kx2mw5av3], Granted Authorities=[Jaas Authority [admin,admin], Jaas Authority [build,build], Jaas Authority [architect,architect], Jaas Authority [user,user], Jaas Authority [deploy,deploy]]]