Ask coding questions

← Back to all posts
Google not helping :(
isaiah08 (63)

I get an error, then get an email saying google has blocked it. How can i turn this off? Thanks!

mrshaw (9)

I'm not sure why you call .ehlo twice. But ignoring that, there seems to be a simpler way to create an SSL connection to GMail using the following method:


Give that a go and see if you have anymore luck!

Coder100 (17122)

Have you turned on allow unsafe applications?
click here to learn how to turn it on

isaiah08 (63)

I did, but i'm still getting this error:
Traceback (most recent call last):
File "", line 18, in <module>
server.login(sender_email, password)
File "/usr/lib/python3.8/", line 734, in login
raise last_exception
File "/usr/lib/python3.8/", line 723, in login
(code, resp) = self.auth(
File "/usr/lib/python3.8/", line 646, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 l6sm298046ilq.61 - gsmtp')


mil510774 (0)

@isaiah08 I'm having the same issue if you could explain how to fix the problem please let me know.

Coder100 (17122)

Are those even valid emails? @isaiah08

isaiah08 (63)

I had them valid but changed them as to not give away my email. @Coder100

isaiah08 (63)

I have no idea how to fix it, but you probably should not do it on if you are not a hacker because someone could come in and steal you email and password. @mil510774

Coder100 (17122)

use a .env file smh smh @isaiah08