fastlane-plugin-send_e_mail 0.1.0 → 0.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e68971472784f75b198c3bb1c7e8a384b9f49bf5
|
4
|
+
data.tar.gz: 6160295536e043fc6e3a8febec70b9fe63ade185
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71fccafcb16a55c21f2e147b215bf222a3dbe2556299510463bb176d5597759a2538570ada30f8d2cb7332e1aa6e4675d2591a6230f97744f472b715abe214d
|
7
|
+
data.tar.gz: 7c7ff6ca7e32ae0487e6d604d92e765685df1756b713020681665eec1608ced48ce6acd3c03d893304b402da307f347aea6b9a095e4e2daa1899b43052af9fcd
|
@@ -7,7 +7,7 @@ require 'net/smtp'
|
|
7
7
|
module Fastlane
|
8
8
|
module Actions
|
9
9
|
class SendEMailAction < Action
|
10
|
-
def self.send_emails(
|
10
|
+
def self.send_emails(stmpserver_address, sender_address, password, recipients, subject, message_body)
|
11
11
|
recipients.each do |recipient_address|
|
12
12
|
message_header = ''
|
13
13
|
message_header << "From: <#{sender_address}>\r\n"
|
@@ -15,7 +15,7 @@ module Fastlane
|
|
15
15
|
message_header << "Subject: #{subject}\r\n"
|
16
16
|
message_header << "Date: " + Time.now.to_s + "\r\n"
|
17
17
|
message = message_header + "\r\n" + message_body + "\r\n"
|
18
|
-
Net::SMTP.start(
|
18
|
+
Net::SMTP.start(stmpserver_address, 25, "localhost", sender_address, password, :plain) do |smtp|
|
19
19
|
# begin
|
20
20
|
smtp.send_message(message, sender_address, recipient_address)
|
21
21
|
# rescue
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
# @params = params
|
31
31
|
# UI.message("The send_e_mail plugin is working!")
|
32
32
|
# self.send_emails(params[:stmpServer], params[:userName], params[:password], @params[:recipients], params[:subject], params[:message_body])
|
33
|
-
self.send_emails(params[
|
33
|
+
self.send_emails(params[:stmp_server], params[:user_name], params[:password], params[:recipients], params[:subject], params[:message_body])
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.description
|
@@ -53,39 +53,39 @@ module Fastlane
|
|
53
53
|
def self.available_options
|
54
54
|
[
|
55
55
|
# stmp servername
|
56
|
-
FastlaneCore::ConfigItem.new(key: :
|
56
|
+
FastlaneCore::ConfigItem.new(key: :stmp_server,
|
57
57
|
env_name: "SEND_E_MAIL_STMP_SERVER",
|
58
|
-
description: "
|
58
|
+
description: "servername",
|
59
59
|
optional: false,
|
60
60
|
type: String),
|
61
|
-
FastlaneCore::ConfigItem.new(key: :
|
61
|
+
FastlaneCore::ConfigItem.new(key: :user_name,
|
62
62
|
env_name: "SEND_E_MAIL_USERNAME",
|
63
|
-
description: "
|
63
|
+
description: "USERNAME",
|
64
64
|
optional: false,
|
65
65
|
type: String),
|
66
66
|
FastlaneCore::ConfigItem.new(key: :password,
|
67
67
|
env_name: "SEND_E_MAIL_PASSWORD",
|
68
|
-
description: "
|
68
|
+
description: "password",
|
69
69
|
optional: false,
|
70
70
|
type: String),
|
71
71
|
FastlaneCore::ConfigItem.new(key: :recipients,
|
72
72
|
env_name: "SEND_E_MAIL_YOUR_OPTION",
|
73
|
-
description: "
|
73
|
+
description: "recipients",
|
74
74
|
optional: false,
|
75
|
-
type:
|
75
|
+
type: Array),
|
76
76
|
FastlaneCore::ConfigItem.new(key: :subject,
|
77
77
|
env_name: "SEND_E_MAIL_YOUR_OPTION",
|
78
|
-
description: "
|
78
|
+
description: "subject",
|
79
79
|
optional: true,
|
80
80
|
type: String),
|
81
81
|
FastlaneCore::ConfigItem.new(key: :message_body,
|
82
82
|
env_name: "SEND_E_MAIL_YOUR_OPTION",
|
83
|
-
description: "
|
83
|
+
description: "message_body",
|
84
84
|
optional: true,
|
85
85
|
type: String),
|
86
86
|
FastlaneCore::ConfigItem.new(key: :attachment,
|
87
|
-
env_name: "
|
88
|
-
description: "A description of
|
87
|
+
env_name: "SEND_E_MAIL_attachment",
|
88
|
+
description: "A description of attachment",
|
89
89
|
optional: true,
|
90
90
|
type: String)
|
91
91
|
]
|