simple example of mimelib? and embedding (not attaching) images in email sent with python.
Stephen
shriek at gmx.co.uk
Fri Aug 17 03:01:10 EDT 2001
> It's actually fairly easy using mimelib. Note that
>
> http://mimelib.sf.net
>
> contains a pretty up-to-date description of the library API, but it is
> missing an examples section. That's on my to do list.
I'm sure that will lead to much greater adoption. Thank you.
> S> Also if I read between the lines of some posts in the archive,
> S> is it safe to assume that mimelib is the way to go for future
> S> MIME manipulation?
>
> That's the intention. Guido has given me the green light for adding
> mimelib to Python 2.2's standard library, and I intend to work on that
> over the next several days. I've got a few bugs and improvements to
> work out, and a little bit more documentation to right, but I think
> it's quite useful as is. I also think it has a flexible enough
> architecture to provide room for expansion as time goes on.
Good to hear. At least I feel comfortable going to the bother of
learning the in's and out's.
> One question though: while I original wrote mimelib to handle the
> MIME-specific tasks, it really is shaping up to be a general mail
> handling library. "mimelib" might be the wrong name for it.
> "maillib" and "emaillib" seem inelegant, and "messagelib" too
> generic. So while mimelib will be able to replace even rfc822.py (at
> least at the API level initially, perhaps later at the implementation
> level too), we may just have to live with the misnomer, unless someone
> can come up with a good -- not too clever, but descriptive -- name.
As per following posts, would agree that messagelib is good. Mimelib
really is a bit nuts-and-bolts-are-your-friends-ly.
> Have you looked at the unit tests that come with mimelib? There are
> enough examples there to get the basic feel. For example, look at
> test_multipart.py for an example of how to create a MIME message
> containing a plain text part and an image attachment.
Now, this was an eyeopener. I initially deleted the download package
after installation. Maybe want to copy these tests over to the install
directory too ?
Stephen
ps. So, do the cravindogs get an email every time somebody installs your
software ? :-)
More information about the Python-list
mailing list