def dispatch_create_item!(msg)
      if msg.has_attachments?
        draft = msg.draft
        msg.draft = true
        resp = validate_created_item(ews.create_item(msg.to_ews))
        msg.file_attachments.each do |f|
          next unless f.kind_of?(File)
          resp.add_file_attachment(f)
        end
        if draft
          resp.submit_attachments!
          resp
        else
          resp.submit!
        end
      else
        resp = ews.create_item(msg.to_ews)
        validate_created_item resp
      end
    end
def dispatch_create_item!(msg)
      if msg.has_attachments?
        draft = msg.draft
        msg.draft = true
        resp = validate_created_item(ews.create_item(msg.to_ews))
        msg.file_attachments.each do |f|
          next unless f.kind_of?(File)
          resp.add_file_attachment(f)
        end
        if draft
          resp.submit_attachments!
          resp
        else
          resp.submit!
        end
      else
        resp = ews.create_item(msg.to_ews)
        validate_created_item resp
      end
    end
def dispatch_create_item! ( msg ) if msg . has_attachments? draft = msg . draft msg . draft = true resp = validate_created_item ( ews . create_item ( msg . to_ews ) ) msg . file_attachments . each do | f | next unless f . kind_of? ( File ) resp . add_file_attachment ( f ) end if draft resp . submit_attachments! resp else resp . submit! end else resp = ews . create_item ( msg . to_ews ) validate_created_item resp end end
Handles the CreateItem call for Forward, ReplyTo, and ReplyAllTo
 It will handle the neccessary actions for adding attachments.
Handles the CreateItem call for Forward ReplyTo and ReplyAllTo It will handle the neccessary actions for adding attachments .