5 Replies Latest reply on Aug 21, 2017 12:21 AM by DrizztLU

    Extra white space in emails sent

    vee Apprentice

      I have some triggers that sends the contents of an email to the Incident owner to let them know that an email has been received. I've found however that when the email is sent almost every line is double spaced where is only meant to be a single space or newline.

       

      The code segment looks like this:

       

      My signature looks like this:

      But when it gets emailed via the trigger, it comes out like this:

       

      Any idea how I could get rid of all that extra white space and have the email send as it was received? Thanks heaps!

        • 1. Re: Extra white space in emails sent
          AlasdairRobertson ITSMMVPGroup

          Check the HTML, if you use <p> tags you will get more space between the lines, use </br> instead then you will not get the additional space.

          • 2. Re: Extra white space in emails sent
            vee Apprentice

            Thanks Alasdair,

            I figured it might be something to do with HTML so to test I created a completely blank notification with just $([Journal#Email.]EmailBody) as an expression but it still does the same thing.

            I read a bit about how Outlook interprets spaces and I'm thinking because the email originated from Outlook, being sent back out might be the issue? Not sure, I'll have to keep playing.

            Thanks for your input though

            • 3. Re: Extra white space in emails sent
              DrizztLU Apprentice

              Hi Vee,

               

              We also had the same issue, mail exchanges resulted in totally broken emails (because outlook is adding a lot of tags)

              Back then I added a rule to strip down outlook tagging (XHTML I believe, with the namespace prefix)

               

              I updated newly created emails when they contained "o:p>": $(Replace(EmailBody,  "o:p>",  "p>")), but I can't remember why not including the start of the tag.

               

              Hope it helps

              1 of 1 people found this helpful
              • 4. Re: Extra white space in emails sent
                vee Apprentice

                Thanks for that! I'll give it a go.

                 

                You didn't include the start of the tag because then the closing tags: </o:p> wouldn't match.

                 

                I tried your example but unfortunately it seemed to have no effect but you've given me a great lead so I'll keep playing, thanks again!

                • 5. Re: Extra white space in emails sent
                  DrizztLU Apprentice

                  Hi vee,

                   

                  Oh yes, comes back to my mind

                   

                  Also, it might sound obvious, but we also had an issue where our mails where not treated as "HTML"

                  Here's the complete resolution we used (The Incident BO doesn't have to be changed in your case, but we used to put the email body in the description):

                   

                  In the Journal.Email BO, changed the field type of field EmailBody to HTML.

                  In the Incident BO, changed the field type of field Symptom (Description) to HTML. The form control was changed to HTML Editor.

                   

                  In the "Email Configuration >> Servers", changed the value of "Store Journal Email As" to HTML.