Search code examples
objective-cmailcoremailcore2

How to store extra header value with MailCore2?


I add an extra header value with MailCore2:

MCOMessageHeader *messageHeader = message.header; 
[messageHeader setExtraHeaderValue:spamScoreString forName:@"Spam Score"];

How can I save this new header value to the IMAP server?

I have already searched for sample code and I have also read the class reference for MCOMessageHeader (which, by the way, states the wrong method name - (void)addHeaderValue:(NSString *)value forName:(NSString *)name)


Solution

  • editWith the help of dinhviethoa in the MailCore2 forum on GitHub (https://github.com/MailCore/mailcore2/issues/680), the question could be answered:

    • It is not possible to edit the header of an existing email.
    • However, it is possible to remove the existing message from the server and append a new message (with extra headers).