email body contains bad characters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mike

    email body contains bad characters

    I have created a side application in VB.NET which reads
    rows from a DB and builds an email message.

    when i have a long string the the mailmessage.bod y or the
    mailmessage, it puts in an "!<linefeed><sp ace>" at about
    every 980th space. I have confirmed that these characters
    are not in the string or the message body before the email
    is sent. Has anyone seen this or have any thoughts?

    Thanks
    Mike
  • Peter Huang [MSFT]

    #2
    RE: email body contains bad characters

    Hi Mike,

    I can not reproduce the problem, when I test to send a string from a txt
    file about 40kb.

    1.You may try to send the mail via another smtp server to see if the
    problem persists.
    2. You may try to send a string which is not retrieve from the DB, e.g. you
    may get it from a txt file, to see if the problem persists.
    if yes, I hope you can post the code and the test txt file which will
    become the mail.body for me to reproduce the problem on my machine.
    3. What Mail client did you use?

    I will appreciate your effort.


    Regards,
    Peter Huang
    Microsoft Online Partner Support
    Get Secure! www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    --------------------[color=blue]
    >Content-Class: urn:content-classes:message
    >From: "mike" <mike.gradilone @linedata.com>
    >Sender: "mike" <mike.gradilone @linedata.com>
    >Subject: email body contains bad characters
    >Date: Tue, 9 Sep 2003 07:59:16 -0700
    >Lines: 11
    >Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
    >MIME-Version: 1.0
    >Content-Type: text/plain;
    > charset="iso-8859-1"
    >Content-Transfer-Encoding: 7bit
    >X-Newsreader: Microsoft CDO for Windows 2000
    >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    >Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
    >Newsgroups: microsoft.publi c.dotnet.genera l
    >Path: cpmsftngxa06.ph x.gbl
    >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:107789
    >NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
    >X-Tomcat-NG: microsoft.publi c.dotnet.genera l
    >
    >I have created a side application in VB.NET which reads
    >rows from a DB and builds an email message.
    >
    >when i have a long string the the mailmessage.bod y or the
    >mailmessage, it puts in an "!<linefeed><sp ace>" at about
    >every 980th space. I have confirmed that these characters
    >are not in the string or the message body before the email
    >is sent. Has anyone seen this or have any thoughts?
    >
    >Thanks
    >Mike
    >[/color]

    Comment

    • Mike

      #3
      RE: email body contains bad characters

      Hi Peter, thanks for the quick reply and the suggestions.
      I tried using a hard coded string and a different web
      server and still recveived the same results. However i
      stumbled on a solution to the problem by adding a VbCrLf
      to the end of the line. Let me give you a bit of backgroud
      on what i am doing here:

      This app will read rows from a table which represent
      individual items. There may be more than one row per
      email. This application, a windows service built in VB,
      takes the SQLDataReader and reads every in a While
      Datareader.Read loop. In each iteration, a MailMessage
      object is created with a header and individual line
      representing the data. It then attempts to add this
      mailmessage to a hash, using a key based on the email
      address. If it fails the add because it already exist in
      the hash, we take the datastring and append it to the end
      of the mailmessage.bod y of the existing item in the hash.

      previously we only had one CrLf at the end of the add to
      the body of the message. but now when i put in another
      crlf at the end of the string itself, it seems to work.

      Sorry for the long-winded explanation. I would like you to
      see the code, but i will have to email it to you: i cant
      post this material to a newsgroup.

      thanks
      Mike

      [color=blue]
      >-----Original Message-----
      >Hi Mike,
      >
      >I can not reproduce the problem, when I test to send a[/color]
      string from a txt[color=blue]
      >file about 40kb.
      >
      >1.You may try to send the mail via another smtp server to[/color]
      see if the[color=blue]
      >problem persists.
      >2. You may try to send a string which is not retrieve[/color]
      from the DB, e.g. you[color=blue]
      >may get it from a txt file, to see if the problem[/color]
      persists.[color=blue]
      >if yes, I hope you can post the code and the test txt[/color]
      file which will[color=blue]
      >become the mail.body for me to reproduce the problem on[/color]
      my machine.[color=blue]
      >3. What Mail client did you use?
      >
      >I will appreciate your effort.
      >
      >
      >Regards,
      >Peter Huang
      >Microsoft Online Partner Support
      >Get Secure! www.microsoft.com/security
      >This posting is provided "as is" with no warranties and[/color]
      confers no rights.[color=blue]
      >
      >--------------------[color=green]
      >>Content-Class: urn:content-classes:message
      >>From: "mike" <mike.gradilone @linedata.com>
      >>Sender: "mike" <mike.gradilone @linedata.com>
      >>Subject: email body contains bad characters
      >>Date: Tue, 9 Sep 2003 07:59:16 -0700
      >>Lines: 11
      >>Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
      >>MIME-Version: 1.0
      >>Content-Type: text/plain;
      >> charset="iso-8859-1"
      >>Content-Transfer-Encoding: 7bit
      >>X-Newsreader: Microsoft CDO for Windows 2000
      >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
      >>Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
      >>Newsgroups: microsoft.publi c.dotnet.genera l
      >>Path: cpmsftngxa06.ph x.gbl
      >>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
      microsoft.publi c.dotnet.genera l:107789[color=blue][color=green]
      >>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
      >>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
      >>
      >>I have created a side application in VB.NET which reads
      >>rows from a DB and builds an email message.
      >>
      >>when i have a long string the the mailmessage.bod y or[/color][/color]
      the[color=blue][color=green]
      >>mailmessage , it puts in an "!<linefeed><sp ace>" at about
      >>every 980th space. I have confirmed that these[/color][/color]
      characters[color=blue][color=green]
      >>are not in the string or the message body before the[/color][/color]
      email[color=blue][color=green]
      >>is sent. Has anyone seen this or have any thoughts?
      >>
      >>Thanks
      >>Mike
      >>[/color]
      >
      >.
      >[/color]

      Comment

      • Bill

        #4
        Re: email body contains bad characters

        SMTP has a defined limit of 76 characters per line. Some mail
        servers/gateways will not accept your mail if this line length is not
        enforced. If you want your e-mail to look better you should add your own
        breaks when creating the text this will make sure the breaks are on the
        correct lines. Another option is to use quoted-printable encoding which
        will break the lines for you.

        Feel free to see:



        "Mike" <mike.gradilone @linedata.com> wrote in message
        news:0c7601c377 99$05c42c70$a30 1280a@phx.gbl.. .[color=blue]
        > Hi Peter, thanks for the quick reply and the suggestions.
        > I tried using a hard coded string and a different web
        > server and still recveived the same results. However i
        > stumbled on a solution to the problem by adding a VbCrLf
        > to the end of the line. Let me give you a bit of backgroud
        > on what i am doing here:
        >
        > This app will read rows from a table which represent
        > individual items. There may be more than one row per
        > email. This application, a windows service built in VB,
        > takes the SQLDataReader and reads every in a While
        > Datareader.Read loop. In each iteration, a MailMessage
        > object is created with a header and individual line
        > representing the data. It then attempts to add this
        > mailmessage to a hash, using a key based on the email
        > address. If it fails the add because it already exist in
        > the hash, we take the datastring and append it to the end
        > of the mailmessage.bod y of the existing item in the hash.
        >
        > previously we only had one CrLf at the end of the add to
        > the body of the message. but now when i put in another
        > crlf at the end of the string itself, it seems to work.
        >
        > Sorry for the long-winded explanation. I would like you to
        > see the code, but i will have to email it to you: i cant
        > post this material to a newsgroup.
        >
        > thanks
        > Mike
        >
        >[color=green]
        > >-----Original Message-----
        > >Hi Mike,
        > >
        > >I can not reproduce the problem, when I test to send a[/color]
        > string from a txt[color=green]
        > >file about 40kb.
        > >
        > >1.You may try to send the mail via another smtp server to[/color]
        > see if the[color=green]
        > >problem persists.
        > >2. You may try to send a string which is not retrieve[/color]
        > from the DB, e.g. you[color=green]
        > >may get it from a txt file, to see if the problem[/color]
        > persists.[color=green]
        > >if yes, I hope you can post the code and the test txt[/color]
        > file which will[color=green]
        > >become the mail.body for me to reproduce the problem on[/color]
        > my machine.[color=green]
        > >3. What Mail client did you use?
        > >
        > >I will appreciate your effort.
        > >
        > >
        > >Regards,
        > >Peter Huang
        > >Microsoft Online Partner Support
        > >Get Secure! www.microsoft.com/security
        > >This posting is provided "as is" with no warranties and[/color]
        > confers no rights.[color=green]
        > >
        > >--------------------[color=darkred]
        > >>Content-Class: urn:content-classes:message
        > >>From: "mike" <mike.gradilone @linedata.com>
        > >>Sender: "mike" <mike.gradilone @linedata.com>
        > >>Subject: email body contains bad characters
        > >>Date: Tue, 9 Sep 2003 07:59:16 -0700
        > >>Lines: 11
        > >>Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
        > >>MIME-Version: 1.0
        > >>Content-Type: text/plain;
        > >> charset="iso-8859-1"
        > >>Content-Transfer-Encoding: 7bit
        > >>X-Newsreader: Microsoft CDO for Windows 2000
        > >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
        > >>Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
        > >>Newsgroups: microsoft.publi c.dotnet.genera l
        > >>Path: cpmsftngxa06.ph x.gbl
        > >>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
        > microsoft.publi c.dotnet.genera l:107789[color=green][color=darkred]
        > >>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
        > >>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
        > >>
        > >>I have created a side application in VB.NET which reads
        > >>rows from a DB and builds an email message.
        > >>
        > >>when i have a long string the the mailmessage.bod y or[/color][/color]
        > the[color=green][color=darkred]
        > >>mailmessage , it puts in an "!<linefeed><sp ace>" at about
        > >>every 980th space. I have confirmed that these[/color][/color]
        > characters[color=green][color=darkred]
        > >>are not in the string or the message body before the[/color][/color]
        > email[color=green][color=darkred]
        > >>is sent. Has anyone seen this or have any thoughts?
        > >>
        > >>Thanks
        > >>Mike
        > >>[/color]
        > >
        > >.
        > >[/color][/color]


        Comment

        • Peter Huang [MSFT]

          #5
          RE: email body contains bad characters

          Hi Mike,

          I agree with Bill's suggestion. So that I suggest you change another smtp
          server.
          If you want to email to me, you may email to my email address with the
          "online" omitted.

          I look forward to hearing from you.

          Regards,
          Peter Huang
          Microsoft Online Partner Support
          Get Secure! www.microsoft.com/security
          This posting is provided "as is" with no warranties and confers no rights.

          Regards,
          Peter Huang
          Microsoft Online Partner Support
          Get Secure! www.microsoft.com/security
          This posting is provided "as is" with no warranties and confers no rights.

          --------------------[color=blue]
          >Content-Class: urn:content-classes:message
          >From: "Mike" <mike.gradilone @linedata.com>
          >Sender: "Mike" <mike.gradilone @linedata.com>
          >References: <569c01c376e2$f 0918160$a601280 a@phx.gbl>[/color]
          <kHCCS02dDHA.21 16@cpmsftngxa06 .phx.gbl>[color=blue]
          >Subject: RE: email body contains bad characters
          >Date: Wed, 10 Sep 2003 05:42:40 -0700
          >Lines: 101
          >Message-ID: <0c7601c37799$0 5c42c70$a301280 a@phx.gbl>
          >MIME-Version: 1.0
          >Content-Type: text/plain;
          > charset="iso-8859-1"
          >Content-Transfer-Encoding: 7bit
          >X-Newsreader: Microsoft CDO for Windows 2000
          >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
          >Thread-Index: AcN3mQXECbRgzfm xThykjnjzUL1n1Q ==
          >Newsgroups: microsoft.publi c.dotnet.genera l
          >Path: cpmsftngxa06.ph x.gbl
          >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:107927
          >NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
          >X-Tomcat-NG: microsoft.publi c.dotnet.genera l
          >
          >Hi Peter, thanks for the quick reply and the suggestions.
          >I tried using a hard coded string and a different web
          >server and still recveived the same results. However i
          >stumbled on a solution to the problem by adding a VbCrLf
          >to the end of the line. Let me give you a bit of backgroud
          >on what i am doing here:
          >
          >This app will read rows from a table which represent
          >individual items. There may be more than one row per
          >email. This application, a windows service built in VB,
          >takes the SQLDataReader and reads every in a While
          >Datareader.Rea d loop. In each iteration, a MailMessage
          >object is created with a header and individual line
          >representing the data. It then attempts to add this
          >mailmessage to a hash, using a key based on the email
          >address. If it fails the add because it already exist in
          >the hash, we take the datastring and append it to the end
          >of the mailmessage.bod y of the existing item in the hash.
          >
          >previously we only had one CrLf at the end of the add to
          >the body of the message. but now when i put in another
          >crlf at the end of the string itself, it seems to work.
          >
          >Sorry for the long-winded explanation. I would like you to
          >see the code, but i will have to email it to you: i cant
          >post this material to a newsgroup.
          >
          >thanks
          >Mike
          >
          >[color=green]
          >>-----Original Message-----
          >>Hi Mike,
          >>
          >>I can not reproduce the problem, when I test to send a[/color]
          >string from a txt[color=green]
          >>file about 40kb.
          >>
          >>1.You may try to send the mail via another smtp server to[/color]
          >see if the[color=green]
          >>problem persists.
          >>2. You may try to send a string which is not retrieve[/color]
          >from the DB, e.g. you[color=green]
          >>may get it from a txt file, to see if the problem[/color]
          >persists.[color=green]
          >>if yes, I hope you can post the code and the test txt[/color]
          >file which will[color=green]
          >>become the mail.body for me to reproduce the problem on[/color]
          >my machine.[color=green]
          >>3. What Mail client did you use?
          >>
          >>I will appreciate your effort.
          >>
          >>
          >>Regards,
          >>Peter Huang
          >>Microsoft Online Partner Support
          >>Get Secure! www.microsoft.com/security
          >>This posting is provided "as is" with no warranties and[/color]
          >confers no rights.[color=green]
          >>
          >>--------------------[color=darkred]
          >>>Content-Class: urn:content-classes:message
          >>>From: "mike" <mike.gradilone @linedata.com>
          >>>Sender: "mike" <mike.gradilone @linedata.com>
          >>>Subject: email body contains bad characters
          >>>Date: Tue, 9 Sep 2003 07:59:16 -0700
          >>>Lines: 11
          >>>Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
          >>>MIME-Version: 1.0
          >>>Content-Type: text/plain;
          >>> charset="iso-8859-1"
          >>>Content-Transfer-Encoding: 7bit
          >>>X-Newsreader: Microsoft CDO for Windows 2000
          >>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
          >>>Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
          >>>Newsgroups : microsoft.publi c.dotnet.genera l
          >>>Path: cpmsftngxa06.ph x.gbl
          >>>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
          >microsoft.publ ic.dotnet.gener al:107789[color=green][color=darkred]
          >>>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
          >>>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
          >>>
          >>>I have created a side application in VB.NET which reads
          >>>rows from a DB and builds an email message.
          >>>
          >>>when i have a long string the the mailmessage.bod y or[/color][/color]
          >the[color=green][color=darkred]
          >>>mailmessag e, it puts in an "!<linefeed><sp ace>" at about
          >>>every 980th space. I have confirmed that these[/color][/color]
          >characters[color=green][color=darkred]
          >>>are not in the string or the message body before the[/color][/color]
          >email[color=green][color=darkred]
          >>>is sent. Has anyone seen this or have any thoughts?
          >>>
          >>>Thanks
          >>>Mike
          >>>[/color]
          >>
          >>.
          >>[/color]
          >[/color]

          Comment

          • Mike

            #6
            RE: email body contains bad characters

            I think it did have something to do with the 76 characters
            per line limit. I was inserting my own line breaks, but
            somewhere around the 85th character.

            Thanks to everyone who helped out with this one.

            Mike


            [color=blue]
            >-----Original Message-----
            >Hi Mike,
            >
            >I agree with Bill's suggestion. So that I suggest you[/color]
            change another smtp[color=blue]
            >server.
            >If you want to email to me, you may email to my email[/color]
            address with the[color=blue]
            >"online" omitted.
            >
            >I look forward to hearing from you.
            >
            >Regards,
            >Peter Huang
            >Microsoft Online Partner Support
            >Get Secure! www.microsoft.com/security
            >This posting is provided "as is" with no warranties and[/color]
            confers no rights.[color=blue]
            >
            >Regards,
            >Peter Huang
            >Microsoft Online Partner Support
            >Get Secure! www.microsoft.com/security
            >This posting is provided "as is" with no warranties and[/color]
            confers no rights.[color=blue]
            >
            >--------------------[color=green]
            >>Content-Class: urn:content-classes:message
            >>From: "Mike" <mike.gradilone @linedata.com>
            >>Sender: "Mike" <mike.gradilone @linedata.com>
            >>References: <569c01c376e2$f 0918160$a601280 a@phx.gbl>[/color]
            ><kHCCS02dDHA.2 116@cpmsftngxa0 6.phx.gbl>[color=green]
            >>Subject: RE: email body contains bad characters
            >>Date: Wed, 10 Sep 2003 05:42:40 -0700
            >>Lines: 101
            >>Message-ID: <0c7601c37799$0 5c42c70$a301280 a@phx.gbl>
            >>MIME-Version: 1.0
            >>Content-Type: text/plain;
            >> charset="iso-8859-1"
            >>Content-Transfer-Encoding: 7bit
            >>X-Newsreader: Microsoft CDO for Windows 2000
            >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
            >>Thread-Index: AcN3mQXECbRgzfm xThykjnjzUL1n1Q ==
            >>Newsgroups: microsoft.publi c.dotnet.genera l
            >>Path: cpmsftngxa06.ph x.gbl
            >>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
            microsoft.publi c.dotnet.genera l:107927[color=blue][color=green]
            >>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
            >>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
            >>
            >>Hi Peter, thanks for the quick reply and the[/color][/color]
            suggestions.[color=blue][color=green]
            >>I tried using a hard coded string and a different web
            >>server and still recveived the same results. However i
            >>stumbled on a solution to the problem by adding a VbCrLf
            >>to the end of the line. Let me give you a bit of[/color][/color]
            backgroud[color=blue][color=green]
            >>on what i am doing here:
            >>
            >>This app will read rows from a table which represent
            >>individual items. There may be more than one row per
            >>email. This application, a windows service built in VB,
            >>takes the SQLDataReader and reads every in a While
            >>Datareader.Re ad loop. In each iteration, a MailMessage
            >>object is created with a header and individual line
            >>representin g the data. It then attempts to add this
            >>mailmessage to a hash, using a key based on the email
            >>address. If it fails the add because it already exist in
            >>the hash, we take the datastring and append it to the[/color][/color]
            end[color=blue][color=green]
            >>of the mailmessage.bod y of the existing item in the[/color][/color]
            hash.[color=blue][color=green]
            >>
            >>previously we only had one CrLf at the end of the add to
            >>the body of the message. but now when i put in another
            >>crlf at the end of the string itself, it seems to work.
            >>
            >>Sorry for the long-winded explanation. I would like you[/color][/color]
            to[color=blue][color=green]
            >>see the code, but i will have to email it to you: i cant
            >>post this material to a newsgroup.
            >>
            >>thanks
            >>Mike
            >>
            >>[color=darkred]
            >>>-----Original Message-----
            >>>Hi Mike,
            >>>
            >>>I can not reproduce the problem, when I test to send a[/color]
            >>string from a txt[color=darkred]
            >>>file about 40kb.
            >>>
            >>>1.You may try to send the mail via another smtp server[/color][/color][/color]
            to[color=blue][color=green]
            >>see if the[color=darkred]
            >>>problem persists.
            >>>2. You may try to send a string which is not retrieve[/color]
            >>from the DB, e.g. you[color=darkred]
            >>>may get it from a txt file, to see if the problem[/color]
            >>persists.[color=darkred]
            >>>if yes, I hope you can post the code and the test txt[/color]
            >>file which will[color=darkred]
            >>>become the mail.body for me to reproduce the problem on[/color]
            >>my machine.[color=darkred]
            >>>3. What Mail client did you use?
            >>>
            >>>I will appreciate your effort.
            >>>
            >>>
            >>>Regards,
            >>>Peter Huang
            >>>Microsoft Online Partner Support
            >>>Get Secure! www.microsoft.com/security
            >>>This posting is provided "as is" with no warranties and[/color]
            >>confers no rights.[color=darkred]
            >>>
            >>>--------------------
            >>>>Content-Class: urn:content-classes:message
            >>>>From: "mike" <mike.gradilone @linedata.com>
            >>>>Sender: "mike" <mike.gradilone @linedata.com>
            >>>>Subject: email body contains bad characters
            >>>>Date: Tue, 9 Sep 2003 07:59:16 -0700
            >>>>Lines: 11
            >>>>Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
            >>>>MIME-Version: 1.0
            >>>>Content-Type: text/plain;
            >>>> charset="iso-8859-1"
            >>>>Content-Transfer-Encoding: 7bit
            >>>>X-Newsreader: Microsoft CDO for Windows 2000
            >>>>X-MimeOLE: Produced By Microsoft MimeOLE[/color][/color][/color]
            V5.50.4910.0300[color=blue][color=green][color=darkred]
            >>>>Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
            >>>>Newsgroup s: microsoft.publi c.dotnet.genera l
            >>>>Path: cpmsftngxa06.ph x.gbl
            >>>>Xref: cpmsftngxa06.ph x.gbl[/color]
            >>microsoft.pub lic.dotnet.gene ral:107789[color=darkred]
            >>>>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
            >>>>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
            >>>>
            >>>>I have created a side application in VB.NET which[/color][/color][/color]
            reads[color=blue][color=green][color=darkred]
            >>>>rows from a DB and builds an email message.
            >>>>
            >>>>when i have a long string the the mailmessage.bod y or[/color]
            >>the[color=darkred]
            >>>>mailmessage , it puts in an "!<linefeed><sp ace>" at[/color][/color][/color]
            about[color=blue][color=green][color=darkred]
            >>>>every 980th space. I have confirmed that these[/color]
            >>characters[color=darkred]
            >>>>are not in the string or the message body before the[/color]
            >>email[color=darkred]
            >>>>is sent. Has anyone seen this or have any thoughts?
            >>>>
            >>>>Thanks
            >>>>Mike
            >>>>
            >>>
            >>>.
            >>>[/color]
            >>[/color]
            >
            >.
            >[/color]

            Comment

            • Mike

              #7
              RE: email body contains bad characters

              I think it did have something to do with the 76 characters
              per line limit. I was inserting my own line breaks, but
              somewhere around the 85th character.

              Thanks to everyone who helped out with this one.

              Mike


              [color=blue]
              >-----Original Message-----
              >Hi Mike,
              >
              >I agree with Bill's suggestion. So that I suggest you[/color]
              change another smtp[color=blue]
              >server.
              >If you want to email to me, you may email to my email[/color]
              address with the[color=blue]
              >"online" omitted.
              >
              >I look forward to hearing from you.
              >
              >Regards,
              >Peter Huang
              >Microsoft Online Partner Support
              >Get Secure! www.microsoft.com/security
              >This posting is provided "as is" with no warranties and[/color]
              confers no rights.[color=blue]
              >
              >Regards,
              >Peter Huang
              >Microsoft Online Partner Support
              >Get Secure! www.microsoft.com/security
              >This posting is provided "as is" with no warranties and[/color]
              confers no rights.[color=blue]
              >
              >--------------------[color=green]
              >>Content-Class: urn:content-classes:message
              >>From: "Mike" <mike.gradilone @linedata.com>
              >>Sender: "Mike" <mike.gradilone @linedata.com>
              >>References: <569c01c376e2$f 0918160$a601280 a@phx.gbl>[/color]
              ><kHCCS02dDHA.2 116@cpmsftngxa0 6.phx.gbl>[color=green]
              >>Subject: RE: email body contains bad characters
              >>Date: Wed, 10 Sep 2003 05:42:40 -0700
              >>Lines: 101
              >>Message-ID: <0c7601c37799$0 5c42c70$a301280 a@phx.gbl>
              >>MIME-Version: 1.0
              >>Content-Type: text/plain;
              >> charset="iso-8859-1"
              >>Content-Transfer-Encoding: 7bit
              >>X-Newsreader: Microsoft CDO for Windows 2000
              >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
              >>Thread-Index: AcN3mQXECbRgzfm xThykjnjzUL1n1Q ==
              >>Newsgroups: microsoft.publi c.dotnet.genera l
              >>Path: cpmsftngxa06.ph x.gbl
              >>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
              microsoft.publi c.dotnet.genera l:107927[color=blue][color=green]
              >>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
              >>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
              >>
              >>Hi Peter, thanks for the quick reply and the[/color][/color]
              suggestions.[color=blue][color=green]
              >>I tried using a hard coded string and a different web
              >>server and still recveived the same results. However i
              >>stumbled on a solution to the problem by adding a VbCrLf
              >>to the end of the line. Let me give you a bit of[/color][/color]
              backgroud[color=blue][color=green]
              >>on what i am doing here:
              >>
              >>This app will read rows from a table which represent
              >>individual items. There may be more than one row per
              >>email. This application, a windows service built in VB,
              >>takes the SQLDataReader and reads every in a While
              >>Datareader.Re ad loop. In each iteration, a MailMessage
              >>object is created with a header and individual line
              >>representin g the data. It then attempts to add this
              >>mailmessage to a hash, using a key based on the email
              >>address. If it fails the add because it already exist in
              >>the hash, we take the datastring and append it to the[/color][/color]
              end[color=blue][color=green]
              >>of the mailmessage.bod y of the existing item in the[/color][/color]
              hash.[color=blue][color=green]
              >>
              >>previously we only had one CrLf at the end of the add to
              >>the body of the message. but now when i put in another
              >>crlf at the end of the string itself, it seems to work.
              >>
              >>Sorry for the long-winded explanation. I would like you[/color][/color]
              to[color=blue][color=green]
              >>see the code, but i will have to email it to you: i cant
              >>post this material to a newsgroup.
              >>
              >>thanks
              >>Mike
              >>
              >>[color=darkred]
              >>>-----Original Message-----
              >>>Hi Mike,
              >>>
              >>>I can not reproduce the problem, when I test to send a[/color]
              >>string from a txt[color=darkred]
              >>>file about 40kb.
              >>>
              >>>1.You may try to send the mail via another smtp server[/color][/color][/color]
              to[color=blue][color=green]
              >>see if the[color=darkred]
              >>>problem persists.
              >>>2. You may try to send a string which is not retrieve[/color]
              >>from the DB, e.g. you[color=darkred]
              >>>may get it from a txt file, to see if the problem[/color]
              >>persists.[color=darkred]
              >>>if yes, I hope you can post the code and the test txt[/color]
              >>file which will[color=darkred]
              >>>become the mail.body for me to reproduce the problem on[/color]
              >>my machine.[color=darkred]
              >>>3. What Mail client did you use?
              >>>
              >>>I will appreciate your effort.
              >>>
              >>>
              >>>Regards,
              >>>Peter Huang
              >>>Microsoft Online Partner Support
              >>>Get Secure! www.microsoft.com/security
              >>>This posting is provided "as is" with no warranties and[/color]
              >>confers no rights.[color=darkred]
              >>>
              >>>--------------------
              >>>>Content-Class: urn:content-classes:message
              >>>>From: "mike" <mike.gradilone @linedata.com>
              >>>>Sender: "mike" <mike.gradilone @linedata.com>
              >>>>Subject: email body contains bad characters
              >>>>Date: Tue, 9 Sep 2003 07:59:16 -0700
              >>>>Lines: 11
              >>>>Message-ID: <569c01c376e2$f 0918160$a601280 a@phx.gbl>
              >>>>MIME-Version: 1.0
              >>>>Content-Type: text/plain;
              >>>> charset="iso-8859-1"
              >>>>Content-Transfer-Encoding: 7bit
              >>>>X-Newsreader: Microsoft CDO for Windows 2000
              >>>>X-MimeOLE: Produced By Microsoft MimeOLE[/color][/color][/color]
              V5.50.4910.0300[color=blue][color=green][color=darkred]
              >>>>Thread-Index: AcN24vCRbEaUVCS kTFi7S5KYVpNGyA ==
              >>>>Newsgroup s: microsoft.publi c.dotnet.genera l
              >>>>Path: cpmsftngxa06.ph x.gbl
              >>>>Xref: cpmsftngxa06.ph x.gbl[/color]
              >>microsoft.pub lic.dotnet.gene ral:107789[color=darkred]
              >>>>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
              >>>>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
              >>>>
              >>>>I have created a side application in VB.NET which[/color][/color][/color]
              reads[color=blue][color=green][color=darkred]
              >>>>rows from a DB and builds an email message.
              >>>>
              >>>>when i have a long string the the mailmessage.bod y or[/color]
              >>the[color=darkred]
              >>>>mailmessage , it puts in an "!<linefeed><sp ace>" at[/color][/color][/color]
              about[color=blue][color=green][color=darkred]
              >>>>every 980th space. I have confirmed that these[/color]
              >>characters[color=darkred]
              >>>>are not in the string or the message body before the[/color]
              >>email[color=darkred]
              >>>>is sent. Has anyone seen this or have any thoughts?
              >>>>
              >>>>Thanks
              >>>>Mike
              >>>>
              >>>
              >>>.
              >>>[/color]
              >>[/color]
              >
              >.
              >[/color]

              Comment

              Working...