feat(GODT-2703): got rid of account details dialog with Apple Mail autoconf.

This commit is contained in:
Xavier Michelon
2023-06-21 10:21:19 +02:00
parent a2c2710760
commit 09eef64514
3 changed files with 10 additions and 3 deletions

View File

@ -70,9 +70,11 @@ func prepareMobileConfig(
password []byte, password []byte,
) *mobileconfig.Config { ) *mobileconfig.Config {
return &mobileconfig.Config{ return &mobileconfig.Config{
DisplayName: username, DisplayName: username,
EmailAddress: addresses, EmailAddress: addresses,
Identifier: "protonmail " + username + strconv.FormatInt(time.Now().Unix(), 10), AccountName: username,
AccountDescription: username,
Identifier: "protonmail " + username + strconv.FormatInt(time.Now().Unix(), 10),
IMAP: &mobileconfig.IMAP{ IMAP: &mobileconfig.IMAP{
Hostname: hostname, Hostname: hostname,
Port: imapPort, Port: imapPort,

View File

@ -30,6 +30,7 @@ type Config struct {
DisplayName string DisplayName string
Identifier string Identifier string
Organization string Organization string
AccountName string
AccountDescription string AccountDescription string
IMAP *IMAP IMAP *IMAP

View File

@ -24,6 +24,10 @@ const mailTemplate = `<?xml version="1.0" encoding="UTF-8"?>
<key>PayloadContent</key> <key>PayloadContent</key>
<array> <array>
<dict> <dict>
{{- if .AccountName}}
<key>EmailAccountName</key>
<string>{{.AccountName}}</string>
{{- end}}
{{- if .AccountDescription}} {{- if .AccountDescription}}
<key>EmailAccountDescription</key> <key>EmailAccountDescription</key>
<string>{{.AccountDescription}}</string> <string>{{.AccountDescription}}</string>