How to solve SMTP Recipient Refused error - django

I had set app password in EMAIL_PASSWORD but i am getting this error smtp RecipientsRefused.The entered gmail ids are correct.
I have followed all mentioned procedures in app password generation i don't know what is the cause of the error

Related

SMTP Error: Could not authenticate error in Drupal when AWS SES SMTP access key

I updated the access key for an IAM SMTP user which was earlier used to send emails. After updating the new active key in the drupal application, email functionality stopped working. I am getting the following error from the application.
SMTP Error: Could not authenticate.
Troubleshooting the issue has led me to this
https://aws.amazon.com/premiumsupport/knowledge-center/ses-rotate-smtp-access-keys/
which mentions that if there is an access key update, it must be changed to SES SMTP format.
With the code mentioned, I generated key in a different format and added to the application but still no luck.
Have anyone come across this issue before?

Email send using app password - Username and Password not accepted?

I can't figure out why I can't send email in Django.
I've enabled 2-step verification and generated App Password for this connection.
But Gmail smtp returns:
SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials q29sm16257362qtc.10 - gsmtp')
I thought that using App Password will not cause such errors.
EDIT:
The email uses a custom domain but I guess this is not a problem. I think that smtp.gmail.com should work.
I haven't allowed less secured apps since I think it is not needed with App Password.
I had the same problem with two-factor authentication and allowed less secured apps. It is necessary to use App password ! there is still one last feature to activate: https://accounts.google.com/DisplayUnlockCaptcha
If you have a Gsuite domain click on this link : https://admin.google.com/ac/security/lsa and "Allow users to manage their access to less secure applications"

discourse can't send email

i installed a discourse on AWS bitnami edu3d.co. I did the following things but still can't send the login verification email.
config the discourse by this instruction https://docs.bitnami.com/bch/apps/discourse/configuration/configure-smtp/
in AWS, request email sending limits
in AWS, verify my email identity,
in AWS, send test email (it is correct)
create my credential
checked spam boxes (no email)
Thank you!
The problem is solved. I guess problem is that I set the username and password wrongly.
smtp_address = ''
smtp_port = 587
smtp_domain = 'edu3d.co'
smtp_user_name = ''
smtp_password = ''
smtp_enable_start_tls = true
smtp_authentication = login
If you have problem in setting smtp for the discourse installed on AWS EC2 bitnami. You can do the following checks.
1) check whether your VM instance can connect the smtp server (test if smtp_address and smtp_port are correct)
I found 25 is not responding and 465 sometimes broke too, 587 works well.
2) check whether your username and password set correctly.
AWS provides this instruction https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-client-command-line.html
How I find the problem
I really can't figure out why the smtp setting is 'correct' but i just can't receive the email. So I changed to gmail, the setting is a bit easier than AWS SES. After change, I received the email immediately but it says the login method is not secure so Google blocked it. This proves the smtp setting is working. And according to previous test, my VM instance can connect to the smtp server. So there should have something wrong in the smtp setting.
I go to AWS SES, intending to check the my credential. But I can only create a new one. So I did, then I found I misunderstood the username and password. After change, the email is working. Great!
The following instruction is very helpful!
https://docs.bitnami.com/bch/apps/discourse/configuration/configure-smtp/

Can not send email from host account to user email while resetting password

I have made a smtp configuration in my django app settings, which will sent a email in users account to reset password.but whenever i enter the form it causes an error like TimeoutError at /password_reset/ [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Error connection refused while registering user in django registration

I followed this post How to disable email activation in django-registration app? and made changes to my django-registration code . So even though user is getting registered once I click on submit button , it still gives me an error page saying socket error . That means it is still trying to send the mail , though I have set it to false . How to get rid of this ?
I'm guessing this is in development? rather then turning email off you could try setting the email backend to dummy or file in your settings.py while in debug.
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'