Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Fri, 24 Feb 2006 14:51:28 -0800,    group: microsoft.public.exchange2000.development        back       


Modifying Content-Transfer-Encoding header   
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);
}
date: Fri, 24 Feb 2006 14:51:28 -0800   author:   David A. Coursey

RE: Modifying Content-Transfer-Encoding header   
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
date: Fri, 24 Feb 2006 14:57:27 -0800   author:   David A. Coursey

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us