Error cuando estoy usando MailCore2 en Swift 2

Estoy usando MailCore2 en Swift en mi aplicación iOS para enviar mensajes a correo electrónico en segundo plano sin abrir la aplicación de correo incorporada, pero cuando estoy ejecutando la aplicación en mi dispositivo (dispositivo real) tengo este problema:

Mi código completo para el botón de enviar:

@IBAction func sendButton(sender: AnyObject) {

    var smtpSession = MCOSMTPSession()
    smtpSession.hostname = "smtp.gmail.com"
    smtpSession.username = "from-email"
    smtpSession.password = "password"
    smtpSession.port = 465
    smtpSession.authType = MCOAuthType.SASLPlain
    smtpSession.connectionType = MCOConnectionType.TLS
    smtpSession.connectionLogger = {(connectionID, type, data) in
        if data != nil {
            if let string = NSString(data: data, encoding: NSUTF8StringEncoding){
                NSLog("Connectionlogger: \(string)")
            }
        }
    }

    var builder = MCOMessageBuilder()
    builder.header.to = [MCOAddress(displayName: "AAA", mailbox: "to-email")]
    builder.header.from = MCOAddress(displayName: "RRR", mailbox: "from-email")
    builder.header.subject = messageTitleTextField.text
    var message = messageTextView.text
    builder.htmlBody = message

    let rfc822Data = builder.data()
    let sendOperation = smtpSession.sendOperationWithData(rfc822Data)
    sendOperation.start { (error) -> Void in
        if (error != nil) {
            NSLog("Error sending email: \(error)")
        } else {
            NSLog("Sent successfully, Thanks!")
        }
    }
}

Error:

 Optional(Error Domain=MCOErrorDomain Code=5 "Unable to authenticate with the current session's credentials." UserInfo={NSLocalizedDescription=Unable to authenticate with the current session's credentials.})

Respuestas a la pregunta(2)

Su respuesta a la pregunta