lib/macaco/senders/mandrill.rb in macaco-0.0.4 vs lib/macaco/senders/mandrill.rb in macaco-0.0.5
- old
+ new
@@ -27,9 +27,14 @@
text: @body_text
}
}
end
+ def to(val = nil)
+ return @to unless val
+ @to << { email: val }
+ end
+
def send
data = to_hash.merge!({ key: api_key })
Macaco::Api.post({ mail: self, data: convert_data_params(data) })
end