Error: Invalid login: 535-5.7.8 Username and Password not accepted
Yes, code is perfect. However, you need to allow less secure apps from your google account to send emails. Through this link. Allow less secure apps From your Google Account
Yes, code is perfect. However, you need to allow less secure apps from your google account to send emails. Through this link. Allow less secure apps From your Google Account
to send over gmail, you need to use an encrypted connection. this is not possible with telnet alone, but you can use tools like openssl either connect using the starttls option in openssl to convert the plain connection to encrypted… openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf -ign_eof or connect to a ssl sockect directly… … Read more
UPDATE: This feature is no longer supported as of May 30th, 2022. See https://support.google.com/accounts/answer/6010255?hl=en&visit_id=637896899107643254-869975220&p=less-secure-apps&rd=1#zippy=%2Cuse-an-app-password ORIGINAL ANSWER (No longer working): I ran into a similar problem and stumbled on this question. I got an SMTP Authentication Error but my user name / pass was correct. Here is what fixed it. I read this: https://support.google.com/accounts/answer/6010255 In a … Read more
I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive. Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable “Access for less secure apps”, this allows you to use the google smtp for … Read more
First, check whether your installation of Postfix supports pcre by entering the command postconf -m and looking for a line with pcre in it. Once you have verified that you have pcre support, you can do as follows: /etc/postfix/login_maps.pcre: /^(.*)@example\.org$/ ${1} In main.cf: smtpd_sender_login_maps = pcre:/etc/postfix/login_maps.pcre This should work fine.
def send_email(user, pwd, recipient, subject, body): import smtplib FROM = user TO = recipient if isinstance(recipient, list) else [recipient] SUBJECT = subject TEXT = body # Prepare actual message message = “””From: %s\nTo: %s\nSubject: %s\n\n%s “”” % (FROM, “, “.join(TO), SUBJECT, TEXT) try: server = smtplib.SMTP(“smtp.gmail.com”, 587) server.ehlo() server.starttls() server.login(user, pwd) server.sendmail(FROM, TO, message) server.close() … Read more
You can have saslauthd installed but not have any mechanisms installed. It’s quite frustrating and poor error-proofing, IMO. “no applicable SASL mechanisms” literally means it can’t find any of its mechanisms. On a Fedora-based system you’d need to install the cyrus-sasl-plain package if you want to use the ‘PLAIN’ auth mechanisms (i.e. SMTP/STARTTLS). yum install … Read more