Rails mailer smtp authentication error - ruby-on-rails

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

Related

Apple Signin Domain verification failed

I am trying to do the Sign-in with apple feature in my iOS app with support for iOS less than iOS 13, I got suggestions from the web to do it with Apple Sign in JS. In order to do that I need to create a Service for Authentication. I completed steps up to domain verification, as per mentioned in a blog. but can't verify the domain.
I am using a subdomain. I downloaded the file and uploaded in .well-known folder correctly as mentioned. Tried more times but no result. Do I miss anything? Can anybody help me with this?
check your domain has redirect logic or not, for example, if your site redirects https://example.com to https://www.example.com, then verification probably will fail. It was mentioned in Apple's document. You might need to remove the redirect logic temporary then click that verify button.
looks like apple can only verify the top domain, I don't think www.example.com will work, but example.com should work.

Configure Jenkins to send gmail: What am I missing?

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.

Trouble Implementing OAuth in Google Apps Script (Using Domain-Wide Delegation)

I am trying to run the sample Google Apps Script Service Account OAuth example taken from here:
https://github.com/googlesamples/apps-script-oauth2/blob/master/samples/GoogleServiceAccount.gs and keep getting a server timed-out error. I copied the exact code and just substituted in the private key, client email, and a user email. The example code looks to be current as there was an update to it on July 30th.
I have authorized https://www.googleapis.com/drive/v2/files through the admin console as well as https://accounts.google.com/o/oauth2/token and have listed these as scopes in the admin settings (and domain-wide delegation is enabled). I am using an admin account to run the script.
I keep getting the ubiquitious "Server Timed Out" error and nothing shows up in the Execution Logs.
What might be the problem? Any help would be appreciated. Thanks in advance.
Thanks, Gerardo, for pointing me in the right direction. It turned out that our organization manages permissions for the Google Developer's Console by Organizations (in the Google Admin console). Somehow a few accounts, including mine, were kicked out of the Organization that had permissions to access the Developer's Console. After adding myself back in, the sample worked without problems.

Why emails are not sending on production server?

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.

IOS MDM denying checkin request not working

I have a custom mdm solution running for IOS.
during enrollment, I am using HTTP basic authentication to pass the user name and password to be verified against our db/AD.
if the user is denied access, I send a 401.
however, on the IOS side, it pops up an error that says "safari could not install a profile due to an unknown error". Seems like a pretty bad error where I want it to say access denied.
Also there's an issue that safari decides to cache the credential used, so I don't get a chance to re-enter the user/pass again unless I clear all the cookie/cache data.
Anyone have met this issue before?
Looks to be issue with my code.
I've sent a 401, but actually the specification calls for a WWW-Authenticate header to be sent as well. With that added it, it's working normally now.
Have you considered using a more widely tested MDM solution such as AirWatch? A solution such as this has integration with AD and would be an excellent option for you to evaluate.

Resources