Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
2e85e031
Verified
Commit
2e85e031
authored
Jul 01, 2021
by
les
Browse files
add None as SMTP setup option
parent
d04e14b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/cli.js
View file @
2e85e031
...
...
@@ -174,7 +174,7 @@ async function setupQuestionnaire (is_docker, db) {
name
:
'
smtp_type
'
,
message
:
'
How should we send the emails ?
'
,
type
:
'
list
'
,
choices
:
[
'
SMTP
'
,
'
sendmail
'
]
choices
:
[
'
SMTP
'
,
'
sendmail
'
,
'
None (choose later)
'
]
})
questions
.
push
({
...
...
@@ -190,13 +190,13 @@ async function setupQuestionnaire (is_docker, db) {
message
:
'
SMTP Host
'
,
default
:
'
localhost
'
,
validate
:
notEmpty
,
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
})
questions
.
push
({
name
:
'
smtp.secure
'
,
message
:
'
Does SMTP server support TLS?
'
,
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
&&
!
[
'
localhost
'
,
'
127.0.0.1
'
].
includes
(
answers
.
smtp
.
host
),
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
&&
!
[
'
localhost
'
,
'
127.0.0.1
'
].
includes
(
answers
.
smtp
.
host
),
default
:
true
,
type
:
'
confirm
'
})
...
...
@@ -205,7 +205,7 @@ async function setupQuestionnaire (is_docker, db) {
name
:
'
smtp.port
'
,
message
:
'
SMTP Port
'
,
default
:
answers
=>
[
'
localhost
'
,
'
127.0.0.1
'
].
includes
(
answers
.
smtp
.
host
)
?
25
:
(
answers
.
smtp
.
secure
?
465
:
587
),
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
})
questions
.
push
({
...
...
@@ -213,7 +213,7 @@ async function setupQuestionnaire (is_docker, db) {
message
:
'
is SMTP authentication needed?
'
,
type
:
'
confirm
'
,
default
:
answers
=>
!
[
'
localhost
'
,
'
127.0.0.1
'
].
includes
(
answers
.
smtp
.
host
),
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
})
questions
.
push
({
...
...
@@ -221,7 +221,7 @@ async function setupQuestionnaire (is_docker, db) {
message
:
'
SMTP User
'
,
validate
:
notEmpty
,
default
:
answers
=>
answers
.
admin
.
email
,
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
&&
answers
.
smtp_need_auth
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
&&
answers
.
smtp_need_auth
})
questions
.
push
({
...
...
@@ -229,7 +229,7 @@ async function setupQuestionnaire (is_docker, db) {
message
:
'
SMTP Password
'
,
type
:
'
password
'
,
validate
:
notEmpty
,
when
:
answers
=>
answers
.
smtp_type
!
==
'
sendmail
'
&&
answers
.
smtp_need_auth
when
:
answers
=>
answers
.
smtp_type
=
==
'
SMTP
'
&&
answers
.
smtp_need_auth
})
const
answers
=
await
inquirer
.
prompt
(
questions
)
...
...
@@ -287,7 +287,7 @@ async function start (options) {
if
(
firstrun
.
check
(
options
.
config
))
{
if
(
options
.
docker
)
{
consola
.
error
(
'
⚠ ️ Something goes wrong, did you run "docker-compose run --rm gancio gancio setup"
'
'
⚠ ️ Something goes wrong, did you run "docker-compose run --rm gancio gancio setup
--docker --db=<YOUR_DB_DIALECT>
"
'
)
process
.
exit
(
-
1
)
}
...
...
Write
Preview
Supports
Markdown
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