fastlane-plugin-outlook 0.1.0 → 0.1.1
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: 973714c28b098cea099c9c849d1f01497eaf8b8e3c77ffe747297af965cd78d9
|
4
|
+
data.tar.gz: bb536d2490c63049b379ae20ddddc54e0e13b8239c7565219369c71ad5c4407b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94073a244b326e72c592a1df7c328359b4759256f28a3cae3229a817e00a34b9783940b7629bae3a1f9ce3026240b67df7d0df1c4b80e3d9ee41e1a432db12a
|
7
|
+
data.tar.gz: f93927501be8227028de3acf4c6110ebc1b0aa7a66f078902ede3b355fe2343d52c3d2b4a7f15d609ca66390be3df8112044a979126cb65edb616e286a87040b
|
@@ -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.gmail.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
|
|