This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mail Template Space Formatting

Hi,

 

I'm using v7.1.1. I'm running some mail templates for email notifications. There are some specific formats that are required with specific spacing between some text elements etc. To get the data required for the template, I'm running some scripts from the pre-script for generating of the send email process and then passing the string to the rich mail through a parameter. These strings include lots of spaces and I'm trying have these retained in the final email. 

2 example lines in email (notice the field on the right needs to start in the same place no matter what the field name on the left)

User ID:                    1234

Department:              Accounting

 

I've tried a few things:

First, plain text mail template - this almost works but the default font isn't monospaced meaning the fields on the right aren't lined up nicely.

Second, html mail template just changing font-family to Microsoft Sans Serif (a monospaced font so the spaces should line them up correctly). The problem with this is that the spaces between "Department:" and "Accounting" get condensed into one space when it's set to html.

Third, with the same settings from my second attempt, I changed my functions to return ' ' instead of a space. Problem with this is that at some point it gets parsed by one identity and it sanitises the ampersand in   to & so where there should be a space instead I get the clear text of  

 

Any other way to approach this I haven't though of?

Parents
  • I think Your first solution should work as in plain text message font formatting happens only on the target. So You might read that message in Outlook that uses default font on it.

    Clear text should retain all spaces and line breaks in the way You want. But it is the target representation of the mail (or mail client ;-) ) that might show You plain text mail with non-console fonts which does not make it wrong yet ;-)

    ...so go back to first case and observe the mail in some other mail client.
    If You want to have this formatted for display in Outlook the only smart way it using a HTML with table tags.
Reply
  • I think Your first solution should work as in plain text message font formatting happens only on the target. So You might read that message in Outlook that uses default font on it.

    Clear text should retain all spaces and line breaks in the way You want. But it is the target representation of the mail (or mail client ;-) ) that might show You plain text mail with non-console fonts which does not make it wrong yet ;-)

    ...so go back to first case and observe the mail in some other mail client.
    If You want to have this formatted for display in Outlook the only smart way it using a HTML with table tags.
Children
No Data