Can't able to sent mail through using SMTP, How to send mail through Django?

@KenWhitesell

Less secure apps & your Google Account

To help keep your account secure, from May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.

Important: This deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date.
click here

Is there any way to integrate mail or is there any way to integrate Yahoo! mail
How to sent mail through django some one help

I am not seeing where this change in any way affects sending mail through gmail’s SMTP servers.

You’re not “signing in” to your Google Account when sending mail, you’re passing credentials to an SMTP server. The security mechanisms are completely different.

Now, they may still apply some type of restrictions on SMTP authentication, but for now, this is a non-issue.

(Yes, I’m currently using gmail SMTP for sending mail for one specific project. It still works fine.)

Side note: In the future, please do not specifically tag me on posts. If a post here asks a question that I can answer, I will do so.

Evaluating: email.send() did not finish after 3.00 seconds.
This may mean a number of things:

  • This evaluation is really slow and this is expected.
    In this case it’s possible to silence this error by raising the timeout, setting the
    PYDEVD_WARN_EVALUATION_TIMEOUT environment variable to a bigger value.

  • The evaluation may need other threads running while it’s running:
    In this case, it’s possible to set the PYDEVD_UNBLOCK_THREADS_TIMEOUT
    environment variable so that if after a given timeout an evaluation doesn’t finish,
    other threads are unblocked or you can manually resume all threads.

    Alternatively, it’s also possible to skip breaking on a particular thread by setting a
    pydev_do_not_trace = True attribute in the related threading.Thread instance
    (if some thread should always be running and no breakpoints are expected to be hit in it).

  • The evaluation is deadlocked:
    In this case you may set the PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT
    environment variable to true so that a thread dump is shown along with this message and
    optionally, set the PYDEVD_INTERRUPT_THREAD_TIMEOUT to some value so that the debugger
    tries to interrupt the evaluation (if possible) when this happens.

I did all the things correctly
*log in the mail in the chrome (im using linux-ubuntu)

  • gived the correct password
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.google.com' #If you want later change to AWS or some cloud hosting
EMAIL_PORT = 587
EMAIL_HOST_USER = 'parkinghero.ss@gmail.com'
EMAIL_HOST_PASSWORD = '*******' #hiiden the pssword for security reason

Check this link for Flask modify to django

fixed… “Less secure app access” turned it on
thanks to

today (July 23,2023) this just errored:
ret = connection.send_messages([email])

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials e3-20020a170902b78300b001b88af04175sm7230963pls.41 - gsmtp')

I’m a little confused as I used this code to send in April 26,2023 (so well after the 2022 deadline)
'maybe I flipped the “less secure” off and on again and forgot?

Regardless, today I got the error, flipped the setting, no error.