Mailcore2: Sending emails in swift without using apple native emails (Swift 3)
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about getting MailCore2 working in Swift, especially for the CocoaPods and bridging header setup.
Recommended by 2 people across 2 different months, 2017 to 2019.
What it is
A short screencast showing how to send emails from a Swift 3 iOS app using the MailCore2 library, without going through Apple's native mail composer. It covers installing MailCore2 through CocoaPods, setting up the bridging header, and configuring an SMTP session so emails can be sent in the background without user interaction.
What people said
Recommends Charles Xavier · 2017-09 · Stack Overflow · on “MailCore / MailCore2 library not loaded - Failed IPv6 compatibility - Swift”
This should work. I've also created a video to assist anyone else in the future: [this video] 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)") } } }
Recommends Lance Samaria · 2019-03 · Stack Overflow · on “Sending Mailcore2 Plain Emails in Swift”
I would've added this in the comments below the answer but there are so many. The steps in the accepted answer worked especially using the link to the special app password for your google account. But @RoolPaap used a different bridging header then the one I did. I used #include "Mailcore.h" I followed this [this video] #ifndef MyProjectName_Bridging_Header_h #define MyProjectName_Bridging_Header_h #include "Mailcore.h" #endif /* MyProjectName_Bridging_Header_h */
Cites user8105388 · 2018-10 · Stack Overflow · on “sending email by pressing button (Swift4)”
I trying to follow this YouTube tutorial [this video] . This youtube video lets the user send data via email. By just clicking the button. The problem I am not getting the email in my inbox. I am noticing some information in my log file. The problem is that by hitting the button I am not getting a email. In the flog file I took out my IP address. @IBAction func sendemail() { 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 = {(co