summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mail/mail.vala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mail/mail.vala b/src/mail/mail.vala
index f6cedc0..b863014 100644
--- a/src/mail/mail.vala
+++ b/src/mail/mail.vala
@@ -99,8 +99,16 @@ public class MailImplementation {
}
#endif
- public void add_recipient(MailContact contact, GMime.AddressType type) throws DBusError, IOError {
- m.add_mailbox(type, contact.name, contact.email);
+ public void add_recipient(MailContact contact, RecipientType type) throws DBusError, IOError {
+ GMime.AddressType gmime_type;
+
+ switch(type) {
+ case RecipientType.BCC: gmime_type = GMime.AddressType.BCC; break;
+ case RecipientType.CC: gmime_type = GMime.AddressType.CC; break;
+ default: gmime_type = GMime.AddressType.TO; break;
+ }
+
+ m.add_mailbox(gmime_type, contact.name, contact.email);
recipients += contact.email;
}