Truncated html email

Discussion in 'ASP General' started by Mike, Aug 10, 2005.

  1. Mike

    Mike Guest

    I am creating both a text and html version of the same newsletter and
    sending using CDOSYS.

    Both of them incorporate a list of stories drawn from a database which are
    assigned to a variable storyloop.

    The text version works fine, but partway throught the html version when
    viewed in Outlook 2000, it goes wrong. View source shows nothing obviously
    wrong, except that partway through the storyloop, it just stops and then
    goes onto the next section on the email.

    Outputting storyloop to the browser gives perfect results, but if I remove
    all parts of the html email and just assign storyloop to the .htmlbody, I
    see that after exactly 1024 characters in the resulting email, I get ------
    =_NextPart_000_0057_01C59E01.6E3F5F50--

    Does anyone know why this would happen, and more importantly, what I can do
    to correct it?

    TIA

    Mike
     
    Mike, Aug 10, 2005
    #1
    1. Advertising

  2. Mike

    Curt_C [MVP] Guest

    Mike wrote:
    > I am creating both a text and html version of the same newsletter and
    > sending using CDOSYS.
    >
    > Both of them incorporate a list of stories drawn from a database which are
    > assigned to a variable storyloop.
    >
    > The text version works fine, but partway throught the html version when
    > viewed in Outlook 2000, it goes wrong. View source shows nothing obviously
    > wrong, except that partway through the storyloop, it just stops and then
    > goes onto the next section on the email.
    >
    > Outputting storyloop to the browser gives perfect results, but if I remove
    > all parts of the html email and just assign storyloop to the .htmlbody, I
    > see that after exactly 1024 characters in the resulting email, I get ------
    > =_NextPart_000_0057_01C59E01.6E3F5F50--
    >
    > Does anyone know why this would happen, and more importantly, what I can do
    > to correct it?
    >
    > TIA
    >
    > Mike


    Shorter mails work fine though?
    Have you tried to access it from another app then Outlook 2000? (XP,
    2003, OE, etc?)

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com
     
    Curt_C [MVP], Aug 11, 2005
    #2
    1. Advertising

  3. Mike

    Mike Guest

    Curt_C [MVP] wrote:
    > Mike wrote:
    > > I am creating both a text and html version of the same newsletter and
    > > sending using CDOSYS.
    > >
    > > Both of them incorporate a list of stories drawn from a database which are
    > > assigned to a variable storyloop.
    > >
    > > The text version works fine, but partway throught the html version when
    > > viewed in Outlook 2000, it goes wrong. View source shows nothing obviously
    > > wrong, except that partway through the storyloop, it just stops and then
    > > goes onto the next section on the email.
    > >
    > > Outputting storyloop to the browser gives perfect results, but if I remove
    > > all parts of the html email and just assign storyloop to the .htmlbody, I
    > > see that after exactly 1024 characters in the resulting email, I get ------
    > > =_NextPart_000_0057_01C59E01.6E3F5F50--
    > >
    > > Does anyone know why this would happen, and more importantly, what I can do
    > > to correct it?
    > >
    > > TIA
    > >
    > > Mike

    >
    > Shorter mails work fine though?
    > Have you tried to access it from another app then Outlook 2000? (XP,
    > 2003, OE, etc?)
    >



    I've just tried it this morning using Outlook 2003, and it works fine.
    However, the email was generated on a different machine (my one at
    work), so now I'm narrowing it down to either the settings on my home
    machine or the mail client. At least I know it's not the ASP (but then
    I couldn't possibly see how it could be).

    As to shorter emails working fine, I haven't tested that. I'll have to
    do that this evening. I guess I will also have to spend some time
    googling Mimetypes... and the MS KB. See if any light can be shed on
    it all.

    Mike
     
    Mike, Aug 11, 2005
    #3
  4. "Mike" <> wrote in message
    news:Xns96AEED37BA0E7mytokenM@195.188.240.200...
    >I am creating both a text and html version of the same newsletter and
    > sending using CDOSYS.
    >
    > Both of them incorporate a list of stories drawn from a database which are
    > assigned to a variable storyloop.
    >
    > The text version works fine, but partway throught the html version when
    > viewed in Outlook 2000, it goes wrong. View source shows nothing
    > obviously
    > wrong, except that partway through the storyloop, it just stops and then
    > goes onto the next section on the email.
    >
    > Outputting storyloop to the browser gives perfect results, but if I remove
    > all parts of the html email and just assign storyloop to the .htmlbody, I
    > see that after exactly 1024 characters in the resulting email, I
    > get ------
    > =_NextPart_000_0057_01C59E01.6E3F5F50--
    >
    > Does anyone know why this would happen, and more importantly, what I can
    > do
    > to correct it?
    >
    > TIA
    >
    > Mike


    I had something similar happen to me, when I setup an automated script to
    send out scheduled reports. Try inserting some line breaks (vbCRLF) into the
    generated html. For example, this:

    <table>
    <tr><td>Cell1.1</td><td>Cell1.2</td><td>Cell1.3</td></tr>
    <tr><td>Cell2.1</td><td>Cell2.2</td><td>Cell2.3</td></tr>
    <tr><td>Cell3.1</td><td>Cell3.2</td><td>Cell3.3</td></tr>
    <tr><td>Cell4.1</td><td>Cell4.2</td><td>Cell4.3</td></tr>
    </table>

    Is better than this:

    <table><tr><td>Cell1.1</td><td>Cell1.2</td><td>Cell1.3</td></tr><tr><td>Cell2.1</td><td>Cell2.2</td><td>Cell2.3</td></tr><tr><td>Cell3.1</td><td>Cell3.2</td><td>Cell3.3</td></tr>
    <tr><td>Cell4.1</td><td>Cell4.2</td><td>Cell4.3</td></tr></table>


    I suspect this is a problem with the way Outlook parses long continuous
    strings, but that's just conjecture on my part.
     
    Chris Hohmann, Aug 11, 2005
    #4
  5. > I had something similar happen to me, when I setup an automated script to
    > send out scheduled reports. Try inserting some line breaks (vbCRLF) into
    > the generated html. For example, this:
    >
    > <table>
    > <tr><td>Cell1.1</td><td>Cell1.2</td><td>Cell1.3</td></tr>
    > <tr><td>Cell2.1</td><td>Cell2.2</td><td>Cell2.3</td></tr>
    > <tr><td>Cell3.1</td><td>Cell3.2</td><td>Cell3.3</td></tr>
    > <tr><td>Cell4.1</td><td>Cell4.2</td><td>Cell4.3</td></tr>
    > </table>


    And to help reduce length, you can leave out the optional closing tags on a
    lot of elements.

    <table>
    <tr>
    <td>Cell1.1
    <td>Cell1.2
    <td>Cell1.3
    <tr>
    <td>Cell2.1
    <td>Cell2.2
    <td>Cell2.3
    <tr>
    <td>Cell3.1
    <td>Cell3.2
    <td>Cell3.3
    <tr>
    <td>Cell4.1
    <td>Cell4.2
    <td>Cell4.3
    </table>

    Now, this might not be optimal in terms of validating against strict
    doctypes or certain complex CSS attributes, but for generic HTML it should
    be a substantial size saver.
     
    Aaron Bertrand [SQL Server MVP], Aug 11, 2005
    #5
  6. Mike

    Mike Guest

    "Chris Hohmann" <> wrote in
    news:#:

    > "Mike" <> wrote in message
    > news:Xns96AEED37BA0E7mytokenM@195.188.240.200...
    >>I am creating both a text and html version of the same newsletter and
    >> sending using CDOSYS.
    >>
    >> Both of them incorporate a list of stories drawn from a database
    >> which are assigned to a variable storyloop.
    >>
    >> The text version works fine, but partway throught the html version
    >> when viewed in Outlook 2000, it goes wrong. View source shows
    >> nothing obviously
    >> wrong, except that partway through the storyloop, it just stops and
    >> then goes onto the next section on the email.
    >>
    >> Outputting storyloop to the browser gives perfect results, but if I
    >> remove all parts of the html email and just assign storyloop to the
    >> .htmlbody, I see that after exactly 1024 characters in the resulting
    >> email, I get ------
    >> =_NextPart_000_0057_01C59E01.6E3F5F50--
    >>
    >> Does anyone know why this would happen, and more importantly, what I
    >> can do
    >> to correct it?
    >>
    >> TIA
    >>
    >> Mike

    >
    > I had something similar happen to me, when I setup an automated script
    > to send out scheduled reports. Try inserting some line breaks (vbCRLF)
    > into the generated html. For example, this:
    >
    > <table>
    > <tr><td>Cell1.1</td><td>Cell1.2</td><td>Cell1.3</td></tr>
    > <tr><td>Cell2.1</td><td>Cell2.2</td><td>Cell2.3</td></tr>
    > <tr><td>Cell3.1</td><td>Cell3.2</td><td>Cell3.3</td></tr>
    > <tr><td>Cell4.1</td><td>Cell4.2</td><td>Cell4.3</td></tr>
    > </table>
    >
    > Is better than this:
    >
    > <table><tr><td>Cell1.1</td><td>Cell1.2</td><td>Cell1.3</td></tr><tr>

    <td
    > >Cell2.1</td><td>Cell2.2</td><td>Cell2.3</td></tr><tr><td>Cell3.1</td>

    <
    > td>Cell3.2</td><td>Cell3.3</td></tr>
    > <tr><td>Cell4.1</td><td>Cell4.2</td><td>Cell4.3</td></tr></table>
    >
    >
    > I suspect this is a problem with the way Outlook parses long
    > continuous strings, but that's just conjecture on my part.
    >
    >


    Here's the really weird thing - I sent it from my work server to 4
    different email accounts, which I later accessed using Outlook 2000 at
    home. It worked fine for 3 of the accounts, but broke on the one I was
    originally testing with.

    I have also tested it on the same 4 accounts using my testing server at
    home - same result.

    I have to assume that the problem is with the way that one of my email
    service providers have configured their services, rather than anything
    to do with the code, Outlook, or my IIS settings.

    Mike
     
    Mike, Aug 12, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    5,615
    Duane Clark
    Jul 25, 2005
  2. Bertus Dam
    Replies:
    5
    Views:
    882
    Bertus Dam
    Aug 29, 2003
  3. Paul
    Replies:
    1
    Views:
    428
  4. z. f.
    Replies:
    5
    Views:
    595
    David Wang [Msft]
    Jan 31, 2005
  5. RickVidallon
    Replies:
    0
    Views:
    285
    RickVidallon
    Apr 24, 2007
Loading...

Share This Page