mirror of
https://github.com/goharbor/harbor
synced 2025-04-22 12:49:51 +00:00
Merge pull request #1023 from fillet54/add-mail-identity-config
Make mail identity configurable
This commit is contained in:
commit
126b7fae55
@ -9,6 +9,7 @@ names = en-US|zh-CN
|
|||||||
httpport = 80
|
httpport = 80
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
identity = $email_identity
|
||||||
host = $email_server
|
host = $email_server
|
||||||
port = $email_server_port
|
port = $email_server_port
|
||||||
username = $email_username
|
username = $email_username
|
||||||
|
@ -9,6 +9,7 @@ hostname = reg.mydomain.com
|
|||||||
ui_url_protocol = http
|
ui_url_protocol = http
|
||||||
|
|
||||||
#Email account settings for sending out password resetting emails.
|
#Email account settings for sending out password resetting emails.
|
||||||
|
email_identity = Mail Config
|
||||||
email_server = smtp.mydomain.com
|
email_server = smtp.mydomain.com
|
||||||
email_server_port = 25
|
email_server_port = 25
|
||||||
email_username = sample_admin@mydomain.com
|
email_username = sample_admin@mydomain.com
|
||||||
|
@ -73,6 +73,7 @@ validate(rcp)
|
|||||||
hostname = rcp.get("configuration", "hostname")
|
hostname = rcp.get("configuration", "hostname")
|
||||||
protocol = rcp.get("configuration", "ui_url_protocol")
|
protocol = rcp.get("configuration", "ui_url_protocol")
|
||||||
ui_url = protocol + "://" + hostname
|
ui_url = protocol + "://" + hostname
|
||||||
|
email_identity = rcp.get("configuration", "email_identity")
|
||||||
email_server = rcp.get("configuration", "email_server")
|
email_server = rcp.get("configuration", "email_server")
|
||||||
email_server_port = rcp.get("configuration", "email_server_port")
|
email_server_port = rcp.get("configuration", "email_server_port")
|
||||||
email_username = rcp.get("configuration", "email_username")
|
email_username = rcp.get("configuration", "email_username")
|
||||||
@ -191,6 +192,7 @@ render(os.path.join(templates_dir, "ui", "env"),
|
|||||||
|
|
||||||
render(os.path.join(templates_dir, "ui", "app.conf"),
|
render(os.path.join(templates_dir, "ui", "app.conf"),
|
||||||
ui_conf,
|
ui_conf,
|
||||||
|
email_identity=email_identity,
|
||||||
email_server=email_server,
|
email_server=email_server,
|
||||||
email_server_port=email_server_port,
|
email_server_port=email_server_port,
|
||||||
email_username=email_username,
|
email_username=email_username,
|
||||||
|
@ -134,7 +134,7 @@ func loadConfig() {
|
|||||||
useTLS = true
|
useTLS = true
|
||||||
}
|
}
|
||||||
mc = MailConfig{
|
mc = MailConfig{
|
||||||
Identity: "Mail Config",
|
Identity: config["identity"],
|
||||||
Host: config["host"],
|
Host: config["host"],
|
||||||
Port: config["port"],
|
Port: config["port"],
|
||||||
Username: config["username"],
|
Username: config["username"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user