moved function
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Wed, 22 Jul 2015 00:27:08 +0000 (20:27 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:28:39 +0000 (13:28 -0500)
edward

diff --git a/edward b/edward
index 8304f690e5a0d1f52f399381edd82b7aa665cf65..ca332ef597f05652d8a777b9427c774af78f565f 100755 (executable)
--- a/edward
+++ b/edward
@@ -321,16 +321,6 @@ def flatten_payload_pieces (eddy_obj, _ignore):
     return string
 
 
-def email_from_subject (email_text):
-
-    email_struct = email.parser.Parser().parsestr(email_text)
-
-    email_from      = email_struct['From']
-    email_subject   = email_struct['Subject']
-
-    return email_from, email_subject
-
-
 def add_gpg_key (key_block, gpgme_ctx):
 
     fp = io.BytesIO(key_block.encode('ascii'))
@@ -400,6 +390,17 @@ def choose_reply_encryption_key (gpgme_ctx, fingerprints):
     return reply_key
 
 
+def email_to_from_subject (email_text):
+
+    email_struct = email.parser.Parser().parsestr(email_text)
+
+    email_to        = email_struct['To']
+    email_from      = email_struct['From']
+    email_subject   = email_struct['Subject']
+
+    return email_to, email_from, email_subject
+
+
 def generate_encrypted_mime (plaintext, email_from, email_subject, encrypt_to_key,
                     gpgme_ctx):