mailcore2

Fetch an email body in mailcore2 OSX with swift

一笑奈何 提交于 2019-12-12 03:58:38
问题 I try use this class: MCOIMAPFetchContentOperation for fetch body mail. But i don't know how invoke her in swift and i don't know the arguments who are necessary. Description of the class is: "This class implements an operation to fetch the content of a message. It can be a part or a full message." Can you help me please ! 回答1: Your question is a little vague but I assume to mean something like this : func loadMsg(msg: MCOIMAPMessage, folder: String) { let operation:

Email Account For MailCore2

喜你入骨 提交于 2019-12-11 10:16:33
问题 I have created a Swift universal app that incorporates the MailCore2 API. It works perfectly on both debug and release mode. When I asked a friend in California to test it out, an alert view popped up with an error message. I found out that the reason for this was because I was using Google as the account I was emailing from. Here is my code: var smtpSession = MCOSMTPSession() smtpSession.hostname = "smtp.gmail.com" smtpSession.username = "matt@gmail.com" smtpSession.password =

Error when I'm using MailCore2 in Swift 2

半世苍凉 提交于 2019-12-01 10:33:09
I'm using the MailCore2 at Swift in my iOS application to send message to email in the background without open built-in mail application, But when I'm running app on my device ( real device ) I have this problem: My complete code for send button: @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 = {

Error when I'm using MailCore2 in Swift 2

走远了吗. 提交于 2019-12-01 07:30:00
问题 I'm using the MailCore2 at Swift in my iOS application to send message to email in the background without open built-in mail application, But when I'm running app on my device ( real device ) I have this problem: My complete code for send button: @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

Sending Mailcore2 Plain Emails in Swift

落花浮王杯 提交于 2019-11-28 08:35:02
I've recently incorporated MailCore2 into my Objective-C project, and it has worked perfectly. Now, I am in the process of transitioning the code within the app to Swift. I have successfully imported the MailCore2 API into my swift project, but I see no documentation (Google search, libmailcore.com, github) on how to turn the following working Objective-C code into Swift Code: MCOSMTPSession *smtpSession = [[MCOSMTPSession alloc] init]; smtpSession.hostname = @"smtp.gmail.com"; smtpSession.port = 465; smtpSession.username = @"matt@gmail.com"; smtpSession.password = @"password"; smtpSession