|
|
|
@ -105,7 +105,16 @@ void add_attachment(message* msg, const BodyLines& body, const MimeHeaders& mh)
|
|
|
|
|
LOG << "ATTACHMENT name=“" << filename << "”\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const std::string content_type = mh.type + '/' + mh.subtype;
|
|
|
|
|
const std::string content_type = mh.mime_type();
|
|
|
|
|
if( (msg->attachments==nullptr) && (content_type=="message/rfc822") ) // very special requirement. See MIME-12
|
|
|
|
|
{
|
|
|
|
|
const sv forwarded = header_value( mh.tparams, "forwarded");
|
|
|
|
|
if(forwarded.size())
|
|
|
|
|
{
|
|
|
|
|
add_opt_field(msg, Pseudo_Header_Forwarded, forwarded);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bloblist_t* bl = bloblist_add(msg->attachments, decoded, decoded_size, content_type.c_str(), (filename.empty()? nullptr : filename.data()) );
|
|
|
|
|
if(msg->attachments==nullptr)
|
|
|
|
|
{
|
|
|
|
|