I'm using the grails plugin "mail=0.9". Emails are not sending on production server. It just works fine on development environment on localhost.
Error is given below;
Stacktrace follows:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at org.grails.mail.MailService.sendMail(MailService.groovy:63)
at org.grails.mail.MailService.sendMail(MailService.groovy:46)
at org.grails.mail.MailService$sendMail.call(Unknown Source)
at MailGrailsPlugin$_configureSendMail_closure4.doCall(MailGrailsPlugin.groovy:86)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy:107)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy)
at java.lang.Thread.run(Thread.java:636)
Can anyone help me? Why emails are not sending?
Thanks
Finally, after being spending the much time on this issue. I have fixed this error.
Actually the problem was just about to set the Gmail account settings. Google was sending the hidden captcha and that's obvious machine cannot recognize it. So that's why I was getting authentication error.
Solution:
I just unlocked the Gmail captcha and now it works fine.
Steps to reproduce this
1. Logout your gmail account first.
2. Visit this url https://accounts.google.com/DisplayUnlockCaptcha and then put username and password to login
3. Press "Continue" button to unlock the captcha
4. It will automatically save the settings.
Now, Check your application to hit the url like "Forgot Password" request. You will must receive email. :)
You can also read this article.
http://productforums.google.com/forum/#!topic/gmail/uBdBQAuGeTw
Thanks
javax.mail.AuthenticationFailedException means that you are useing incorrect credentials to access to account you use to send emails.
Related
Trying to have Jenkins send an email to a Gmail account upon every build. I get:
Failed to send out e-mail
com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError 9sm5733284oij.25 - gsm
Here's what I tried so far:
Made the gmail account accept emails from less secure apps
Generated an application password from gmail and used it in my Jenkins configuration - got the same error with and without the app password
Looked at at least a dozen answers (yeah) and all the screens showing the Jenkins gmail config look the same as mine
telnet smpt.gmail.com 465 responds as connected
My Jenkins install is localhost using this URL: http://192.168.0.1:8080/
My system admin email address exists and is entered in Jenkins
I've tried filling in the section on Extended E-mail notification and removing the entries - no difference
Turned off Windows Defender, thinking, just maybe???
Also tried to configure Outlook/Hotmail using those smpt parms but that gave different errors
Don't know if this matters but I have that 'It appears that your reverse proxy set up is broken' and I don't recall setting up a reverse proxy!
Any help would be greatly appreciated!
Set up Jenkins email notification as shown below:
To resolve this, create & use app passwords with 2-step verification turned on.
A less secure method is to allow less secure apps without 2-step verification.
I was able to setup Server & Bots with Xcode 9 (ref). The integration can be run smoothly. However, the expected email report is never sent.
I've already setup my Mac to send emails using postfix. For example, I can run this command and then receive the email:
$ date | mail -s test1 nigong#mydomain.com
To make Xcode send email, I have done the following setups:
However, no email is sent or received. I wonder if there is any additional setup is needed.
Any help is appreciated. Many thanks!
After 20 hours searching I finally found the problem. I will try to describe the needed steps to get this working:
On your CI server the postfix SMTP server needs to be configured and working. There are multiple tutorials on the internet. The one I used was this one:
https://blog.anupamsg.me/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/
However, I still was not able to sent a mail with the mail command after I configured everything like explained in the tutorial.
The missing piece was the Gmail setting for "less secure apps". Gmail does not allow sending emails over their SMTP even if login and password are correct. The SMTP server needs to fulfill special requirements. (which I am not aware of...) However, it is possible to losen that restriction and allow access from any SMTP. Here:
https://support.google.com/accounts/answer/6010255
Set "Allow less secure apps" to On. I recommend creating a dedicated Gmail account just for this and not to enable this setting on your day-to-day email account.
Now everything was working and I was able to successfully send mails with the macOS cli command mail.
The last step needed to solve this was to setup the Xcode server settings correctly. (and this is what basically answers OP's question). So, the correct setup (after mail cli works) was to not set any settings in Xcode server. Just remove all the settings, then Xcode server will fall back to postfix.
Just remove all settings, that's it. Now Xcode CI server sends successfully emails.
my mailer can't work because of this error. I can't understannd why. I use G-suite for my email.
Thanks very much for your help !
I had the same problem, recently Google really blocked the access to less secure apps.
But, you could resolve it turning on the 2 steps verification log in, and then the option app password should be allowed. this feature was created to applications that cant' make the 2 steps verification. Google will register a diferent password to be only accessed from this app.
https://www.google.com/settings/security
https://support.google.com/accounts/answer/185833?hl=pt-BR
Reason: Google was blocking access from unknown location (app in production)
Solution: go to following link and turn on https://www.google.com/settings/security/lesssecureapps
I setup google apps and heroku to send mail. I sent the first mail from within my app and everything is great. Then, I changed the email on my google apps account (from matt#website.com to team#website.com)...made sure to change it in heroku config settings...restarted...but now it gives me this error:
Net::SMTPAuthenticationError (535-5.7.1 Please log in with your web browser and then try again. Learn more at
I tried logging in via the web browser and everything is fine. I just keep getting this same error when I try to send mail now.
This should help: http://www.rocketideas.com/2012/05/gmail-error-password-not-accepted-from-server-solved/
I've tested it and it works for me.
i have a problem with mail sending: magento doesn't send any mail, i'm trying to use the sendfriend functionality (i've extendend the ProductController of that Sendfriend module), but the problem is about any email (i've tried to do a registration or to change a password, but no email was sent). backend settings seems to be ok:
System->Configuration->system->Mail sending settings->disable Email Communications->No;
System->Configuration->system->Mail sending settings->Host ->locahost;
with the same settings on another local magento installation the system send emails correctly. what can i check?
you don't need to do any coding stuff. Its already available in Magento. You just need to enable the option of Email to a friend from the back-end. Hope this help you.