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.
- checksums.yaml +4 -4
- data/lib/ews_mail.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2545b1b5e617e6573fc76902b5a812df3391d6ff
|
4
|
+
data.tar.gz: dfe8942b4dad94d62f70b8ae8980acac998a30c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3a221f900e050b046a1c9d0f500a34dfd230a587affa70e651486d8e20fd00a4fd99e925d7558ed473e462443dea351854bbfcf9d05f7bbfad5a62af90df95
|
7
|
+
data.tar.gz: fb6d0a11dd3be1aae1dbc74c279b9bee4132eb06c32110171fd1e3fef591bf8dc0e342255cb9b3786e2f225d62094d25f9451b5dfbbfd52b525819a37c6e03fd
|
data/lib/ews_mail.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2017-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|