From 6ee7fdb3d109e5c4969dea014a495791335f0b09 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Sat, 5 Dec 2015 00:10:24 +0100 Subject: [PATCH] Allow multiple To addresses in SimpleSendableMail Because the struct internally stores a `Vec` it would be nice to be able to construct messages with multiple To addresses. This is in its current form a breaking API change, so feel free to change the way it's implemented. --- src/email/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email/mod.rs b/src/email/mod.rs index 7994a3f..27c2668 100644 --- a/src/email/mod.rs +++ b/src/email/mod.rs @@ -219,10 +219,10 @@ pub struct SimpleSendableEmail { impl SimpleSendableEmail { /// Returns a new email - pub fn new(from_address: &str, to_address: &str, message: &str) -> SimpleSendableEmail { + pub fn new(from_address: &str, to_address: Vec, message: &str) -> SimpleSendableEmail { SimpleSendableEmail { from: from_address.to_string(), - to: vec![to_address.to_string()], + to: to_address, message: message.to_string(), } }