diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-09-21 19:46:26 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-10-12 19:17:41 +0200 |
commit | 80010f6043a6e4e2051f22a5826f368d1ed2d27b (patch) | |
tree | 307fa5b70375f19f1e977da7dd8ad1bc4e64a670 /libimagmail | |
parent | 5825022e5d17fa52870c1889a2a0479e1d5a648b (diff) |
Impl get_{from,to,subject,message_id,in_reply_to}
Diffstat (limited to 'libimagmail')
-rw-r--r-- | libimagmail/src/mail.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libimagmail/src/mail.rs b/libimagmail/src/mail.rs index 62625b03..2187b1fe 100644 --- a/libimagmail/src/mail.rs +++ b/libimagmail/src/mail.rs @@ -94,24 +94,24 @@ impl<'a> Mail<'a> { }) } - pub fn get_from(&self) -> Result<Option<&str>> { - unimplemented!() + pub fn get_from(&self) -> Result<Option<String>> { + self.get_field("From") } - pub fn get_to(&self) -> Result<Option<&str>> { - unimplemented!() + pub fn get_to(&self) -> Result<Option<String>> { + self.get_field("To") } - pub fn get_subject(&self) -> Result<Option<&str>> { - unimplemented!() + pub fn get_subject(&self) -> Result<Option<String>> { + self.get_field("Subject") } - pub fn get_message_id(&self) -> Result<Option<&str>> { - unimplemented!() + pub fn get_message_id(&self) -> Result<Option<String>> { + self.get_field("Message-ID") } - pub fn get_in_reply_to(&self) -> Result<Option<&str>> { - unimplemented!() + pub fn get_in_reply_to(&self) -> Result<Option<String>> { + self.get_field("In-Reply-To") } } |