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

Function get_plain_text_part

src/core/rfc822/MCMessageBuilder.cpp:205–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static struct mailmime * get_plain_text_part(MessageBuilder * builder,
206 const char * mime_type, const char * charset, const char * content_id,
207 const char * description,
208 const char * text, size_t length, clist * contentTypeParameters, bool forEncryption)
209{
210 bool needsQuotedPrintable;
211 int mechanism;
212
213 needsQuotedPrintable = false;
214 if (forEncryption) {
215 needsQuotedPrintable = true;
216 }
217 if (!needsQuotedPrintable) {
218 for(size_t i = 0 ; i < length ; i ++) {
219 if ((text[i] & (1 << 7)) != 0) {
220 needsQuotedPrintable = true;
221 break;
222 }
223 }
224 }
225
226 mechanism = MAILMIME_MECHANISM_7BIT;
227 if (needsQuotedPrintable) {
228 mechanism = MAILMIME_MECHANISM_QUOTED_PRINTABLE;
229 }
230 return get_text_part(builder, mime_type, charset, content_id, description, text, length, mechanism, contentTypeParameters);
231}
232
233static struct mailmime * get_other_text_part(MessageBuilder * builder,
234 const char * mime_type, const char * charset, const char * content_id,

Callers 1

mime_from_attachmentFunction · 0.85

Calls 1

get_text_partFunction · 0.85

Tested by

no test coverage detected