fastlane-plugin-outlook 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a8f856781437326fdbab8e3ffacbc26ae5025579b28d84efe9095ee6b83d42
|
4
|
+
data.tar.gz: 190c9b324246a752b43977ddaf5ea532e029c04bbfe8abc74af94928da117bd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52dcd44dc7751f67d3dd9afbbb7b7189ae93ff97ccb21c18ba6a5a8e7efb042f3308b2541b65e3e3efca28dab1f6854e2a8c9225d7a5090a2506a332fca3beea
|
7
|
+
data.tar.gz: de9b4a75813f9d24dc7bffa191b88989de7ecbc8b82a7f39da80480d5537027f722a74300f898319186efa7ee2a1e844c2a30157dbf01ef64ec4dcadafb32807
|
@@ -5,7 +5,37 @@ module Fastlane
|
|
5
5
|
module Actions
|
6
6
|
class OutlookAction < Action
|
7
7
|
def self.run(params)
|
8
|
-
|
8
|
+
require 'mail'
|
9
|
+
|
10
|
+
Mail.defaults do
|
11
|
+
if params[:password]
|
12
|
+
delivery_method :smtp, {
|
13
|
+
address: 'smtp-mail.outlook.com',
|
14
|
+
port: 587,
|
15
|
+
user_name: params[:username],
|
16
|
+
password: params[:password],
|
17
|
+
authentication: 'plain',
|
18
|
+
enable_starttls_auto: true
|
19
|
+
}
|
20
|
+
else
|
21
|
+
delivery_method :smtp, {
|
22
|
+
port: 587,
|
23
|
+
address: "smtp-relay.gmail.com",
|
24
|
+
domain: params[:domain]
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Mail.deliver do
|
30
|
+
from params[:username]
|
31
|
+
to params[:to]
|
32
|
+
cc params[:cc]
|
33
|
+
subject params[:subject]
|
34
|
+
html_part do
|
35
|
+
content_type 'text/html; charset=UTF-8'
|
36
|
+
body params[:body]
|
37
|
+
end
|
38
|
+
end
|
9
39
|
end
|
10
40
|
|
11
41
|
def self.description
|
@@ -27,11 +57,56 @@ module Fastlane
|
|
27
57
|
|
28
58
|
def self.available_options
|
29
59
|
[
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
60
|
+
FastlaneCore::ConfigItem.new(key: :domain,
|
61
|
+
env_name: "FL_GMAIL_DOMAIN",
|
62
|
+
description: "G Suite domain",
|
63
|
+
optional: true,
|
64
|
+
default_value: "gmail.com",
|
65
|
+
verify_block: proc do |value|
|
66
|
+
UI.user_error!("No domain") if value.to_s.length == 0
|
67
|
+
end),
|
68
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
69
|
+
env_name: "FL_GMAIL_USERNAME",
|
70
|
+
description: "Username for gmail",
|
71
|
+
verify_block: proc do |value|
|
72
|
+
UI.user_error!("No username") if value.to_s.length == 0
|
73
|
+
end),
|
74
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
75
|
+
env_name: "FL_GMAIL_PASSWORD",
|
76
|
+
description: "Password for gmail",
|
77
|
+
optional: true,
|
78
|
+
sensitive: true,
|
79
|
+
verify_block: proc do |value|
|
80
|
+
UI.user_error!("No password") if value.to_s.length == 0
|
81
|
+
end),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :to,
|
83
|
+
env_name: "FL_GMAIL_TO",
|
84
|
+
description: "Mail to recipients",
|
85
|
+
sensitive: true,
|
86
|
+
is_string: false,
|
87
|
+
verify_block: proc do |value|
|
88
|
+
UI.user_error!("No recipients") if value.to_s.length == 0
|
89
|
+
end),
|
90
|
+
FastlaneCore::ConfigItem.new(key: :cc,
|
91
|
+
env_name: "FL_GMAIL_CC",
|
92
|
+
description: "Mail cc recipients",
|
93
|
+
sensitive: true,
|
94
|
+
is_string: false,
|
95
|
+
optional: true),
|
96
|
+
FastlaneCore::ConfigItem.new(key: :subject,
|
97
|
+
env_name: "FL_GMAIL_SUBJECT",
|
98
|
+
description: "The subject of the email",
|
99
|
+
sensitive: true,
|
100
|
+
verify_block: proc do |value|
|
101
|
+
UI.user_error!("No subject of email") if value.to_s.length == 0
|
102
|
+
end),
|
103
|
+
FastlaneCore::ConfigItem.new(key: :body,
|
104
|
+
env_name: "FL_GMAIL_BODY",
|
105
|
+
description: "The body of the email",
|
106
|
+
sensitive: true,
|
107
|
+
verify_block: proc do |value|
|
108
|
+
UI.user_error!("No body of email") if value.to_s.length == 0
|
109
|
+
end)
|
35
110
|
]
|
36
111
|
end
|
37
112
|
|