passing body to mutt mail client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Edwin Grubbs |
Bug Description
Here is a patch for adding support for passing the email body to mutt.
--- mail_client.py 2009-06-05 19:12:55.000000000 -0500
+++ /tmp/mail_client.py 2009-06-05 19:12:44.000000000 -0500
@@ -253,12 +253,12 @@
-class Mutt(ExternalMa
+class Mutt(BodyExtern
"""Mutt mail client."""
_client_
- def _get_compose_
+ def _get_compose_
"""See ExternalMailCli
if subject is not None:
@@ -266,6 +266,14 @@
if attach_path is not None:
+ if body is not None:
+ fd, temp_file = tempfile.
+ suffix=".txt")
+ try:
+ os.write(fd, body)
+ finally:
+ os.close(fd)
+ message_
if to is not None:
return message_options
Thanks for the patch; please make a merge proposal for it.
Please also use a NamedTemporaryFile object not os.write unless
there's a compelling reason.
-- launchpad. net/~mbp/>
Martin <http://