I'm using python and SMTP to send mail
I'm Getting Error in it
My code is
import smtplib
smtp_server = smtplib.SMTP('smtp.gmail.com', 587)
smtp_server.ehlo()
smtp_server.starttls()
smtp_server.login('[email protected]', '587')
smtp_server.sendmail('[email protected]', '[email protected]', 'Subject: Happy Australia Day!\nHi Everyone! Happy Day! Cheers, Julian')
smtp_server.quit()
print('Email sent successfully')
and Errors are
error: [Error 10061] No connection could be made because the target machine actively refused it
error: [error 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Thanks in advance.
telnet smtp.gmail.com 587and add the output here.