MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / attachmentWithText

Method attachmentWithText

src/core/rfc822/MCAttachment.cpp:209–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209Attachment * Attachment::attachmentWithText(String * text)
210{
211 Data * data;
212 Attachment * attachment;
213
214 attachment = new Attachment();
215 attachment->setInlineAttachment(true);
216 attachment->setMimeType(MCSTR("text/plain"));
217 data = text->dataUsingEncoding("utf-8");
218 attachment->setData(data);
219
220 return (Attachment *) attachment->autorelease();
221}
222
223void Attachment::init()
224{

Callers

nothing calls this directly

Calls 5

dataUsingEncodingMethod · 0.80
setInlineAttachmentMethod · 0.45
setMimeTypeMethod · 0.45
setDataMethod · 0.45
autoreleaseMethod · 0.45

Tested by

no test coverage detected