Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
7b6ebc5c
Unverified
Commit
7b6ebc5c
authored
May 13, 2019
by
Honza Hommer
Browse files
try to use ACCOUNT_MAIL if MAIL_FROM is not set
parent
d509ef75
Changes
1
Hide whitespace changes
Inline
Side-by-side
notify/mail.sh
View file @
7b6ebc5c
...
@@ -37,11 +37,21 @@ mail_send() {
...
@@ -37,11 +37,21 @@ mail_send() {
fi
fi
MAIL_TO
=
"
${
MAIL_TO
:-
$(
_readaccountconf_mutable MAIL_TO
)
}
"
MAIL_TO
=
"
${
MAIL_TO
:-
$(
_readaccountconf_mutable MAIL_TO
)
}
"
if
[
-z
"
$MAIL_TO
"
]
;
then
if
[
-n
"
$MAIL_TO
"
]
;
then
if
!
_contains
"
$MAIL_TO
"
"@"
;
then
_err
"It seems that the MAIL_TO=
$MAIL_TO
is not a valid email address."
return
1
fi
_saveaccountconf_mutable MAIL_TO
"
$MAIL_TO
"
else
MAIL_TO
=
"
$(
_readaccountconf ACCOUNT_EMAIL
)
"
MAIL_TO
=
"
$(
_readaccountconf ACCOUNT_EMAIL
)
"
_info
"The MAIL_TO is not set, so use the account email:
$MAIL_TO
"
if
[
-z
"
$MAIL_TO
"
]
;
then
_err
"It seems that account email is empty."
return
1
fi
fi
fi
_saveaccountconf_mutable MAIL_TO
"
$MAIL_TO
"
contenttype
=
"text/plain; charset=utf-8"
contenttype
=
"text/plain; charset=utf-8"
subject
=
"=?UTF-8?B?
$(
echo
"
$_subject
"
| _base64
)
?="
subject
=
"=?UTF-8?B?
$(
echo
"
$_subject
"
| _base64
)
?="
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment