Topic
  • 7 replies
  • Latest Post - ‏2013-07-31T12:43:23Z by michael.muceno
michael.muceno
michael.muceno
33 Posts

Pinned topic Outlook 2010 emails randomly disregards linefeeds from ClearQuest

‏2013-03-27T12:57:46Z |
Using PAINET.MAILMSG using SMTP as the mail transport, I send custom notification via a Notification hook in ClearQuest. Our company is slowly migrating to Outlook 2010 from Outlook 2003. In the message body, I use vbLF for linefeeds. This has worked well with Outlook 2003; however, with 2010 there are some random results. Sometimes the vbLF seems to be overlooked and the string is all on one line. Sometimes in the Outlook preview window, the vbLF seems overlooked, but when you open the email, it appears fine.

When you open the same email in Outlook 2003 - it appears as it should be. In code, I've tried using vbCrLf, chr(10), chr(13), vbCr - all of which give me the random results in Outlook 2010. However, when I replace vbLF with vbLF & vbLF, it seems to accept that. However, from an aesthetics perspective the email message looks odd with double linefeeds.

Has anyone else come across this? Any ideas for a more elegant solution than double linefeeding?
  • michael.muceno
    michael.muceno
    33 Posts
    ACCEPTED ANSWER

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-07-31T12:43:23Z  

    I've found a solution - you can utilize CDO messaging instead of PAINET.  This will allow you to send messages using HTML format.

    Set objMessage = CreateObject("CDO.Message")
     

    Thanks for your help everyone...

  • michael.muceno
    michael.muceno
    33 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-03-27T12:59:12Z  
    I should mention that we are on 7.1.2.08.
  • CQAdmin
    CQAdmin
    103 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-06-10T05:59:57Z  
    I should mention that we are on 7.1.2.08.

    Hello,

    I have seen the same issue a year back.

    All my email notification were showing as raw/unformatted text (or as you said "odd with double linefeeds") with Outlook 2010. Finally, I changed my script (CQ API + Perl), and instead of sending the data through email body; I created a html file using the data on the CQ web server itself and then sends this file as an attachment to the emails. And a simple message in the email body. This approach works fine with Outlook 2003 as well as Outlook 2010.

    All the Best...!!!

    :-)

  • michael.muceno
    michael.muceno
    33 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-06-10T11:52:51Z  
    • CQAdmin
    • ‏2013-06-10T05:59:57Z

    Hello,

    I have seen the same issue a year back.

    All my email notification were showing as raw/unformatted text (or as you said "odd with double linefeeds") with Outlook 2010. Finally, I changed my script (CQ API + Perl), and instead of sending the data through email body; I created a html file using the data on the CQ web server itself and then sends this file as an attachment to the emails. And a simple message in the email body. This approach works fine with Outlook 2003 as well as Outlook 2010.

    All the Best...!!!

    :-)

    Thanks for your solution - I'll look into that; however, I'm still looking for a different workaround that would require minimal user step.  I'm thinking that some of our user base will complain about having to take the extra step of opening an attachment.  Currently I display only the fields that have been modified and their new values in the notifications and supply a link if they want to access the record in CQ. 

    Thanks Again...

  • CQAdmin
    CQAdmin
    103 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-06-11T04:13:57Z  

    Thanks for your solution - I'll look into that; however, I'm still looking for a different workaround that would require minimal user step.  I'm thinking that some of our user base will complain about having to take the extra step of opening an attachment.  Currently I display only the fields that have been modified and their new values in the notifications and supply a link if they want to access the record in CQ. 

    Thanks Again...

    You are welcome.

    :-)

    I preferred this approach to avoid any future issues also. If email body text may look odd or raw with Outlook 2010, there are chances it may look the same in any other email tools or versions. Sending the attachments (a few KB file) should work fine with all the email tools/versions. I you say, I would love share my Perl code with you.

    But yes I do agree with you few/many users may/will not accept this attachment solution.

    If you get something, update me also.

    Thanks in advance and All the Best.

    :-)

  • AdamSkwersky
    AdamSkwersky
    2 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-06-18T14:22:05Z  

    Are you able to get the raw email body and analyze that using a file editor that lets you see hidden characters? (Like EditPad)?

    I suspect that Outlook is trying to be smart about converting between UNIX (LF) and Windows line endings CR and LF but it is messing up. It would help to know what is actually being used in the raw body of the email.

     

  • CQAdmin
    CQAdmin
    103 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-06-19T11:22:23Z  

    Are you able to get the raw email body and analyze that using a file editor that lets you see hidden characters? (Like EditPad)?

    I suspect that Outlook is trying to be smart about converting between UNIX (LF) and Windows line endings CR and LF but it is messing up. It would help to know what is actually being used in the raw body of the email.

     

    I didn't get a chance to do so because of the pressure to resolve the issue ASAP. And Now I have moved out from that group, I can't test it now. But yes I was writing the email body in a tabular form (generated through a html code) and to give it a good design I used lots of New Lines, Tables,borders etc in my html code.

    But yes, you are correct, there are good chances Outlook 2010 is playing around LF/CRs.

  • michael.muceno
    michael.muceno
    33 Posts

    Re: Outlook 2010 emails randomly disregards linefeeds from ClearQuest

    ‏2013-07-31T12:43:23Z  

    I've found a solution - you can utilize CDO messaging instead of PAINET.  This will allow you to send messages using HTML format.

    Set objMessage = CreateObject("CDO.Message")
     

    Thanks for your help everyone...