In order to confirm an action, I create an email message within a Python Script that is considered junk by Outlook 365, using
s = smtplib.SMTP('localhost') s.send_message(msg) s.quit() This works. To prevent the "junk" categorisation, I therefore tried to use my 1and1 account as follows: sender = 'gra...@gemmill.name' addressee = sender smtpaddr = 'smtp.ionos.co.uk' port = 465 passwd = '*********' (deleted, known to be correct) ……. with smtplib.SMTP_SSL(smtpaddr, port, context=context) as smtp: smtp.login(sender, passwd) smtp.send_message(msg) (SORRY - indentation problem....) This results in an error smtplib.SMTPAuthenticationError: (535, b'Authentication credentials invalid') The same error message is given when I use a gmail.com account. In both cases I know the password and username are correct Can you help solve the problem please? Thanks -- Next meeting: Online, Jitsi, Tuesday, 2024-09-03 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... https://dorset.lug.org.uk New thread, don't hijack: mailto:dorset@mailman.lug.org.uk