def send_email options = {}
require_each(options, :subject, :from)
require_one_of(options, :to, :cc, :bcc)
require_one_of(options, :body_text, :body_html)
[:to, :cc, :bcc, :reply_to].each do |key|
if options[key]
options[key] = [options[key]].flatten
end
end
accepted_options = {
:subject => %w(message subject data),
:subject_charset => %w(message subject charset),
:to => %w(destination to_addresses),
:cc => %w(destination cc_addresses),
:bcc => %w(destination bcc_addresses),
:from => %w(source),
:reply_to => %w(reply_to_addresses),
:return_path => %w(return_path),
:body_text => %w(message body text data),
:body_text_charset => %w(message body text charset),
:body_html => %w(message body html data),
:body_html_charset => %w(message body html charset),
}
client.send_email(nest_options(options, accepted_options))
nil
end