Method: Osm::Email.send_email
- Defined in:
- lib/osm/email.rb
.send_email(api, section, send_to, cc = '', from, subject, body) ⇒ Boolean
Get a list of selected email address for selected members ready to pass to send_email method
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/osm/email.rb', line 51 def self.send_email(api, section, send_to, cc='', from, subject, body) data = api.perform_query('ext/members/email/?action=send', { 'sectionid' => section.to_i, 'emails' => send_to.to_json, 'scouts' => send_to.keys.join(','), 'cc' => cc, 'from' => from, 'subject' => subject, 'body' => body, }) return data.is_a?(Hash) && data['ok'] end |