Yahoo SMTP

Travis bossierbossman at yahoo.com
Sun Oct 17 05:11:29 EDT 2004


Can someone give me an example of connecting to yahoo's smtp server 
and sending mail?
I'm doing this:
msg = MIMEText(self.text_ctrl_1.GetValue())
        msg['Subject'] = sub
        msg['From'] = 'bossierbossman at yahoo.com'
        msg['To'] = to
        s = smtplib.SMTP('smtp.mail.yahoo.com')
        s.set_debuglevel(1)
        s.connect()
        s.login('bossierbossman', 'mypassword')
        s.sendmail('bossierbossman at yahoo.com', [to], msg)
        s.quit()
which isn't working out for me.  Any thoughts?






More information about the Python-list mailing list