microsoft.public.sqlserver.notificationsvcs
[Top] [All Lists]

Confused about encoding for SMTP

Subject: Confused about encoding for SMTP
From: "Brent Horine"
Date: Mon, 29 Aug 2005 16:56:50 -0400
Newsgroups: microsoft.public.sqlserver.notificationsvcs
I'm running "NS 2.0 SP1 Std en" on Windows 2003 Server.  I'm sending alerts 
via the SMTP channel.  I got the basics working by adding the Mail Server 
role to the server using Manage Your Server.
Now I'm getting mail but the subject line is in Kanji when opened in 
Outlook, but the text is in english.  When I use webmail, the whole body is 
in Kanji.  Help!  What encoding should I be using?

My appConfig file look like

  <DeliveryChannel>
   <DeliveryChannelName>EmailChannel</DeliveryChannelName>
   <ProtocolName>SMTP</ProtocolName>
   <Arguments>
    <Argument>
     <Name>SmtpServer</Name>
     <Value>localhost</Value>
    </Argument>
    <Argument>
     <Name>Bod oding</Name>
     <Value>utf-8</Value>
    </Argument>
   </Arguments>
  </DeliveryChannel>

My appADF file looks like:

    <Protocol>
     <ProtocolName>SMTP</ProtocolName>
     <Fields>
      <Field>
       <FieldName>Subject</FieldName>
       <SqlExpression>Alert: '+CONVERT (NVARCHAR(30), 
GETDATE())</SqlExpression>
      </Field>
      <Field>
       <FieldName>BodyFormat</FieldName>
       <SqlExpression>'html'</SqlExpression>
      </Field>
      <Field>
       <FieldName>From</FieldName>
       <SqlExpression>'[email protected]'</SqlExpression>
      </Field>
      <Field>
       <FieldName>Priority</FieldName>
       <SqlExpression>'Normal'</SqlExpression>
      </Field>
      <Field>
       <FieldName>To</FieldName>
       <SqlExpression>DeviceAddress</SqlExpression>
      </Field>
     </Fields>
    </Protocol>

My XSLT file looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

 <xsl:template match="notifications">
 <html>
  <head><title>Alert</title></head>
  <body>
   <xsl:apply-templates/>
   <i>Alert provided by VentureGPS.</i><br/><br/>
 </body>
 </html>
 </xsl:template>

 <xsl:template match="notification">
  <B><xsl:value-of select="VehicleName" /></B> was speeding at 
<B><xsl:value-of select="Speed" /> MPH</B>
  at <xsl:value-of select="EventDateTime" /> at <xsl:value-of 
select="Address" />!
<BR/><BR/>

 </xsl:template>

</xsl:stylesheet> 



<Prev in Thread] Current Thread [Next in Thread>