Reputation: 257
I want to make use of SMTP. I have written a simple code that will send mail from one mail address to another.
import smtplib
msg = "smtp_mail"
server = smtplib.SMTP('MailServerAddress')
server = smtplib.SMTP(server)
server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
here I am getting an error AttributeError: SMTP instance has no attribute
'find'
Please help!!
Upvotes: 0
Views: 5359
Reputation: 146
Your program crashes on line : server = smtplib.SMTP(server)
Just remove this line, it's twice !
Upvotes: 3