File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ inputs:
23
23
required : true
24
24
to :
25
25
description : Recipients mail addresses (separated with comma)
26
- required : true
26
+ required : false
27
27
from :
28
28
description : Full name of mail sender (might be with an email address specified in <>)
29
29
required : true
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async function main() {
80
80
81
81
const subject = core . getInput ( "subject" , { required : true } )
82
82
const from = core . getInput ( "from" , { required : true } )
83
- const to = core . getInput ( "to" , { required : true } )
83
+ const to = core . getInput ( "to" , { required : false } )
84
84
const body = core . getInput ( "body" , { required : false } )
85
85
const htmlBody = core . getInput ( "html_body" , { required : false } )
86
86
const cc = core . getInput ( "cc" , { required : false } )
@@ -92,6 +92,11 @@ async function main() {
92
92
const ignoreCert = core . getInput ( "ignore_cert" , { required : false } )
93
93
const priority = core . getInput ( "priority" , { required : false } )
94
94
95
+ // if neither to, cc or bcc is provided, throw error
96
+ if ( ! to && ! cc && ! bcc ) {
97
+ throw new Error ( "At least one of 'to', 'cc' or 'bcc' must be specified" )
98
+ }
99
+
95
100
if ( ! serverAddress ) {
96
101
throw new Error ( "Server address must be specified" )
97
102
}
You can’t perform that action at this time.
0 commit comments