Skip to content

Commit

Permalink
Update email.hl
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Feb 13, 2024
1 parent ebb6bb1 commit 3db8e30
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions backend/files/misc/workflows/actions/misc/email.hl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
from-email
type:email
mandatory:bool:false
reply-to
type:string
mandatory:bool:false
reply-to-email
type:email
mandatory:bool:false
subject
type:string
mandatory:bool:true
Expand All @@ -36,6 +42,7 @@ validators.email:x:@.arguments/*/email
validators.mandatory:x:@.arguments/*/subject
validators.mandatory:x:@.arguments/*/body
validators.email:x:@.arguments/*/from-email
validators.email:x:@.arguments/*/reply-to-email

// Applying defaults.
validators.default:x:@.arguments
Expand Down Expand Up @@ -65,6 +72,21 @@ if
name:x:@.arguments/*/from
email:x:@.arguments/*/from-email

// Checking if we've got an explicit [reply-to] and [reply-to-email] argument.
if
and
exists:x:@.arguments/*/reply-to
exists:x:@.arguments/*/reply-to-email
.lambda

// Adding explicit from name/address.
add:x:../*/mail.smtp.send/*/message
.
reply-to
.
name:x:@.arguments/*/reply-to
email:x:@.arguments/*/reply-to-email

// Forward evaluating arguments to [mail.smtp.send].
unwrap:x:./*/mail.smtp.send/**

Expand Down

0 comments on commit 3db8e30

Please sign in to comment.