I have a server that is sending SMTP messages with base64 encoding, yet for some reason when they get to the receiving server (no hops) they are encoded in 8bit. I wrote an event sink that runs on the Windows 2003 smtp server that sets the Content-Transfer-Encoding header to 7bit, but it is being completely ignored. Am I missing some fundamental thing here? The lines before and after my change work. Thanks for looking dave My Code: try { //Modify the attachment encoding to be 7bit if (bool.Parse(this.message.Fields["urn:schemas:httpmail:hasattachment"].Value.ToString())) { //if (this.message.Fields["urn:schemas:mailheader:Content-Transfer-Encoding"].Value.ToString() != "7bit") //{ TextLog.LogEvent("changing encoding to 7bit", this.dt); this.message.Fields["urn:schemas:mailheader:Foo-Content-Transfer-Encoding"].Value = "7bit"; TextLog.LogEvent("changed encoding to 7bit", this.dt); //} } } catch (Exception ex) { TextLog.LogError(ex.Message, this.dt); } //Save our message object try { this.message.EnvelopeFields.Update(); this.message.Fields.Update(); this.message.DataSource.Save(); } catch (Exception ex) { TextLog.LogError(ex.Message, this.dt); }
I forgot to mention that this event sink is of the type OnArrival. Could it be that in the OnArrival stage I am now allowed to change the encoding? dave