Fairly frustrating - I put this in IDLE / terminal:
import smtplib
server = smtplib.SMTP('smtp.mail.com', 587)
server.starttls()
server.login("emailaddress@mail.com", 'password')
msg = "duck"
server.sendmail("emailaddress@mail.com", "emailaddress@mail.com", msg)
Here's the annoying part - this worked twice, but then when I tried it a third time and thereafter, it just stopped working, getting the following error message:
File "C:\Users\duck\AppData\Local\Programs\Python\Python36-32\lib\smtplib.py", line 880, in sendmail raise SMTPRecipientsRefused(senderrs) smtplib.SMTPRecipientsRefused: {'emailaddress@mail.com': (550, b'Requested action not taken: mailbox unavailable\nFailure sending mail. Try again later')}
I've tried emailing it to the same address I'm sending it from, and a different address - no cigar.
The fact that it was working earlier - but suddenly stopped, does that mean that mail.com limits emails from being sent via smtp? How would I know what if this is a mail.com issue or something I can fix on my end?
I've tried the 'ehlo' command before the starttls() - and it didn't work for me. This was suggested in some other questions about error 550.