Hi, I have to send a message where unfortunately the receiver perceives < > in the header as invalid characters. I've used a previous question I found to remove the brackets from both the To and From fields, however this causes the message.To and message.From fields to be subsequently removed. Trying to assign to those fields then adds new fields back into the header with < >. Is there a way that I can have the following?
message.Headers["To"] = "email@example.com" rather than "<firstname.lastname@example.org>"
(Which I can do) AND at the same time
message.To as "email@example.com" rather then blank or "<firstname.lastname@example.org>".
As part of removing the < > from the To and From fields, I am also using the following on Message-Id, however it does not appear to remove the brackets.
mMessage.Headers["Message-Id"] = new MimeHeader("Message-Id", new Unparsed(mMessage.Headers["Message-Id"].Value.ToString()));
Any help you can give would be much appreciated.