IOS-1542 Set SMTP data. IOS-1542
authorDirk Zimmermann <dz@pep.security>
Wed, 24 Apr 2019 12:43:18 +0200
branchIOS-1542
changeset 83605fc3e8979152
parent 8359 35b77c8f31bf
child 8361 fa62d14b2f33
IOS-1542 Set SMTP data.
pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift
     1.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Wed Apr 24 12:43:18 2019 +0200
     1.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Wed Apr 24 12:43:18 2019 +0200
     1.3 @@ -107,12 +107,23 @@
     1.4              // TODO: Set correct auth method, etc.
     1.5          }
     1.6  
     1.7 +        // IMAP
     1.8          theVerifier.serverIMAP = imap.address
     1.9          if let portString = imap.port, let port = UInt16(portString) {
    1.10              theVerifier.portIMAP = port
    1.11          }
    1.12 -        let _ = Server.Transport(fromString: imap.transport)
    1.13 -        //  TODO: Set the correct transport
    1.14 +        if let transport = Server.Transport(fromString: imap.transport) {
    1.15 +            theVerifier.transportIMAP = ConnectionTransport.init(transport: transport)
    1.16 +        }
    1.17 +
    1.18 +        // SMTP
    1.19 +        theVerifier.serverSMTP = smtp.address
    1.20 +        if let portString = smtp.port, let port = UInt16(portString) {
    1.21 +            theVerifier.portSMTP = port
    1.22 +        }
    1.23 +        if let transport = Server.Transport(fromString: smtp.transport) {
    1.24 +            theVerifier.transportSMTP = ConnectionTransport.init(transport: transport)
    1.25 +        }
    1.26  
    1.27          // TODO: Implement
    1.28          /*