SMTP question

Gilles Lenfant gilles.lenfant at nospam.com
Mon Oct 18 17:49:13 CEST 2004


LutherRevisited a écrit :

> I'm trying to send an email this way:
> 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.sendmail('bossierbossman at yahoo.com', to, msg)
>         s.quit()
> but this is not working at all.  Can someone point me in the right direction?

Have a look at the email package that provides features for building 
easily RFC822 compliant mail headers and bodies (including multipart).

--
Gilles



More information about the Python-list mailing list