ews_mail 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ews_mail.rb +26 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c72418341d146ce815b30aa223a8d4920ca3538f
4
- data.tar.gz: ca1b51dc316e407498bdad315b52a1ff94b05092
3
+ metadata.gz: 2545b1b5e617e6573fc76902b5a812df3391d6ff
4
+ data.tar.gz: dfe8942b4dad94d62f70b8ae8980acac998a30c8
5
5
  SHA512:
6
- metadata.gz: db7652d6870ef0312b9614205b8d6f4e9062954ac5bba9fe98774949f52b03a6041d6b5817f6af4f3af4c0f0148d91429804b285aa15c5b7db2d711799d9675d
7
- data.tar.gz: 5c97bd62daf5aadaf3e85319abde554c5d87ae88ad556623a674875dd5e300f66eddd3a5ff75365483996231b0e823b18317d09b570745884b50ccff61c1d2f4
6
+ metadata.gz: dc3a221f900e050b046a1c9d0f500a34dfd230a587affa70e651486d8e20fd00a4fd99e925d7558ed473e462443dea351854bbfcf9d05f7bbfad5a62af90df95
7
+ data.tar.gz: fb6d0a11dd3be1aae1dbc74c279b9bee4132eb06c32110171fd1e3fef591bf8dc0e342255cb9b3786e2f225d62094d25f9451b5dfbbfd52b525819a37c6e03fd
@@ -1,15 +1,41 @@
1
1
  require 'savon'
2
2
 
3
+ # Exchange Web Services namespace
3
4
  module EWS
5
+ # Mail module
4
6
  module Mail
5
7
 
8
+ # URL of EWS WSDL
6
9
  WSDL = 'https://outlook.office365.com/EWS/Services.wsdl'
10
+ # Endpoint against which we want to run requests
7
11
  ENDPOINT = 'https://outlook.office365.com/EWS/Exchange.asmx'
12
+ # Namespaces to add to the request
8
13
  NAMESPACES = {
9
14
  'xmlns:t' =>
10
15
  'http://schemas.microsoft.com/exchange/services/2006/types'
11
16
  }
12
17
 
18
+ # Send mail via EWS.
19
+ #
20
+ # Senders is determined automatically by EWS based on your
21
+ # username.
22
+ #
23
+ # =Example
24
+ #
25
+ # EWS::Mail.send(
26
+ # username: '<USERNAME>',
27
+ # password: '<PASSWORD>',
28
+ # rcpts: '<RECIPIENT>',
29
+ # subject: '<SUBJECT>',
30
+ # body: '<PLAINTEXT-BODY>'
31
+ # )
32
+ # EWS::Mail.send(
33
+ # username: '<USERNAME>',
34
+ # password: '<PASSWORD>',
35
+ # rcpts: ['<RECIPIENT1>', '<RECIPIENT2>'],
36
+ # subject: '<SUBJECT>',
37
+ # body: '<PLAINTEXT-BODY>'
38
+ # )
13
39
  def self.send(username:, password:, rcpts:, subject:, body:)
14
40
  c = Savon.client({
15
41
  wsdl: WSDL,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ews_mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gray Wolf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-23 00:00:00.000000000 Z
11
+ date: 2017-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon