

我的应用程序通过MailCore框架使用SMTP向gmail帐户发送信息。由于与IPv6不兼容,它已被拒绝。在苹果的崩溃笔记中,它写道:“无法加载库MailCore”。Github表示,MailCore2框架已经与IPv6兼容,所以我不确定问题出在哪里。
在将MailCore.framework添加到“嵌入式二进制文件”部分后,我重新提交了该文件,但不确定这是否能解决此问题。
我附上截图来帮助澄清。谢谢你的帮助!
代码:
let smtpSession = MCOSMTPSession()
smtpSession.hostname = "smtp.gmail.com"
smtpSession.username = "sampleUsername"
smtpSession.password = "samplePassword"
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: String.Encoding.utf8.rawValue){
NSLog("Connectionlogger: \(string)")发布于 2017-09-13 01:45:11
这应该是可行的。我还制作了一个视频来帮助未来的任何人:https://www.youtube.com/watch?v=NkpLqNN8xtU
let smtpSession = MCOSMTPSession()
smtpSession.hostname = "smtp.gmail.com"
smtpSession.username = "charlesxavier1221@gmail.com"
smtpSession.password = "fakepassword1234"
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: String.Encoding.utf8.rawValue){
NSLog("Connectionlogger: \(string)")
}
}
}https://stackoverflow.com/questions/40119863
复制相似问题