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"] = "firstname.lastname@example.org" rather than "<email@example.com>"
(Which I can do) AND at the same time
message.To as "firstname.lastname@example.org" rather then blank or "<email@example.com>".
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.