[RFC] An EmailMessage class for bzrlib

Aaron Bentley aaron.bentley at utoronto.ca
Wed Jun 20 18:56:13 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adeodato Simó wrote:
> Well, this use comes from the original SMTPConnection, and I agree with
> it. The name of the function and the docstring implies that it's only
> intended for stuff to be displayed as text -- which I think it's the
> most common use case in Bazaar.

I read the "text" in add_text_attachment as relating to the intrinsic
nature of the attachment, not the way you want to display it.  And
patches don't guarantee a single encoding, so they're not text.

Also, it is common to use the MIME type "text/x-diff" or "text/x-patch"
for patches.  Your mail client uses "x-diff" for diffs.  Bundle Buggy
looks for those MIME types before it starts guessing based on filenames.

So to me, it looks like you're oversimplifying.

>> I think there might be situations where you'd want to have multiple
>> attachments,
> 
> That's possible: you can call add_text_atachment multiple times. :-)

Yes.  I meant that it wasn't possible with the Email.send method I
proposed.  (But I think that's fine.)

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGeWo90F+nu1YWqI0RApwUAJ9KzA+s2OnJu5yjwUT0FqnDwt/I/QCdEcox
UtKp/XM2tc1MvREvZ69jNTw=
=2W72
-----END PGP SIGNATURE-----



More information about the bazaar mailing list