i need to added pair with 'method' type into Content-Type header like this:
Content-Type: text/calendar; method=REQUEST;
charset="UTF-8"
How can i set in? Does it available during constructing textPart (constructTextPart)? I create part like this (some addditions was made in vmime for iCalendar format):
msgBuilder.constructTextPart(vmime::mediaType(vmime::mediaTypes::TEXT, vmime::mediaTypes::TEXT_CALENDAR));
vmime::textPart & textPart = *msgBuilder.getTextPart();
textPart.setText(vmime::create<vmime::stringContentHandler>(icalbody));
Of course in result message i got only:
Content-Type: text/calendar; charset=utf-8
Thank you.
I construct my own custom textPart
msgBuilder.constructTextPart(vmime::mediaType(vmime::mediaTypes::TEXT, vmime::mediaTypes::TEXT_CALENDAR));
it's actualy construct:
class calendarTextPart : public plainTextPart
{ .. }
and in the generateIn() method i do this:
ref<header> headerObj = part->getHeader();
try
{
ref<contentTypeField> ctf = headerObj->ContentType().dynamicCast <contentTypeField>();
ref<parameter> oldMethod = ctf->findParameter(METHOD);
if(oldMethod)
ctf->removeParameter(oldMethod);
ref<parameter> methodParam = vmime::create <parameter>(METHOD, REQUEST);
ctf->appendParameter(methodParam);
}
catch (exceptions::no_such_field&)
{
}