Sha256: e4e21b0021c961050e040f419421a5b05f9ca9873679c461e0f614dc1b2a8322

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

module Messaging
  module Email
    class SendRaw < RestPack::Service::Command
      required do
        integer :application_id
        string :from #TODO: GJ: add email validation
        string :to
        string :subject
        string :text_body
      end

      optional do
        string :cc
        string :bcc
        string :reply_to
        string :html_body
      end

      def execute
        job_id = Rubykiq.push(
          class: 'Jobs::Email::SendRaw',
          queue: 'email',
          args: [inputs]
        )

        {
          job_id: job_id
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restpack_service_messaging-0.0.4 lib/restpack_service_messaging/commands/email/send_raw.rb
restpack_service_messaging-0.0.3 lib/restpack_service_messaging/commands/email/send_raw.rb