MIME attachments and SMTP

rick_at_brickroad at my-deja.com rick_at_brickroad at my-deja.com
Mon Sep 11 21:57:47 EDT 2000


Thanks! I get a subject and a body now.. that is definetely good..

know anything about attachments and mime types?


  Bjorn Pettersen <bjorn at roguewave.com> wrote:
> change it to:
>
> toaddrs = ['rickr at brickroad.net']  # to: has to be a list
> # add additional headers to the message and separate from
> # body with two newlines
> msg = 'Subject: foobar\n\nblah blah blah blah'
>
> hth,
> -- bjorn
>
> rick_at_brickroad at my-deja.com wrote:
> >
> > I'm trying to set up a command line utility in
> > python.. and I've set up the SMTP to specs but
> > when I send a message doing:
> > server = smtplib.SMTP('myserver')
> > server.set_debuglevel(1)
> > fromaddr = 'rickr at brickroad.net'
> > toaddrs = 'rickr at brickroad.net'
> > msg = 'blah blah blah blah'
> > server.sendmail(fromaddr, toaddrs, msg)
> > server.quit()
> >
> > however, it arrives it arrives with no to: and no
> > subject.
> >
> > I was also wondering if someone could point me to
> > more information on using mime types to add
> > attachments. I've gone through the docs.. but
> > can't find much information on this.
> >
> > thanks
> >
> > Rick
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> > --
> > http://www.python.org/mailman/listinfo/python-list
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list