Allow placeholders in Autoconfig domain
elements
This commit is contained in:
parent
6b976f5f6b
commit
513bd2cec9
2 changed files with 2 additions and 1 deletions
|
@ -112,7 +112,7 @@ private class ClientConfigParser(
|
|||
if (eventType == XmlPullParser.START_TAG) {
|
||||
when (pullParser.name) {
|
||||
"domain" -> {
|
||||
val domain = readText()
|
||||
val domain = readText().replaceVariables()
|
||||
if (domain.isValidHostname()) {
|
||||
domainFound = true
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ class RealAutoconfigParserTest {
|
|||
@Test
|
||||
fun `replace variables`() {
|
||||
val inputStream = minimalConfig.withModifications {
|
||||
element("domain").text("%EMAILDOMAIN%")
|
||||
element("incomingServer > hostname").text("%EMAILLOCALPART%.domain.example")
|
||||
element("outgoingServer > hostname").text("%EMAILLOCALPART%.outgoing.domain.example")
|
||||
element("outgoingServer > username").text("%EMAILDOMAIN%")
|
||||
|
|
Loading…
Reference in a new issue