summaryrefslogtreecommitdiffstats
path: root/libimagmail
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-09-21 19:46:26 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-10-12 19:17:41 +0200
commit80010f6043a6e4e2051f22a5826f368d1ed2d27b (patch)
tree307fa5b70375f19f1e977da7dd8ad1bc4e64a670 /libimagmail
parent5825022e5d17fa52870c1889a2a0479e1d5a648b (diff)
Impl get_{from,to,subject,message_id,in_reply_to}
Diffstat (limited to 'libimagmail')
-rw-r--r--libimagmail/src/mail.rs20
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")
}
}