Reputation: 3241
I'm trying to use MailCore2 in my Swift iOS app, and at the moment; am trying to understand how to reply to an email.
Currently have something working where I can send new email messages, but am trying to figure out how to reply to an existing email.
I've seen a few different questions here asking for the same thing:
But so far, I've not come across anything that actually ends up answering the question. Any help here appreciated!
Upvotes: 0
Views: 293
Reputation: 3241
I ended up figuring it out eventually:
var emailToReplyTo: MCOIMAPMessage!
emailToReplyTo = //the email message that you want to reply to
let reply = emailToReplyTo.header.reply(withExcludedRecipients: [])
let builder = MCOMessageBuilder()
builder.header = reply
builder.header.from = MCOAddress(displayName: "My Name", mailbox: "[email protected]")
builder.htmlBody = "Message body!"
Upvotes: 0