0

I have created a template in salesforce. While testing i came accross an indentation / alignment issue.

test email looks perfect in outlook but it looks messy in other mail.

Can someone let me know the solution or workaround for this.

please find the image for outlook as well as other mail belowenter image description here

enter image description here

below is my email template :

ORDER TYPE                                                       :{!OrderType}
GRAVIC ACCOUNT                                          : {!GravicAccount}
Canon P/O Number                                        :{!Subscription__c.PO_Number__c}
Date Order Placed                                           :{!Subscription__c.CreatedDate}
Placed By                                                             :{!Subscription__c.Subscribed_By__c}
Customer P/O Number                                 :{!CustomerPoNumber}
Customer Code                                                :{!CustomerCode}
Shipping Information                                     :{!ShippingInformation}



ITEM               DESCRIPTION               QUANTITY               LineNo               SKU
------------ -------------------------- ---------------------- ---------------- ------------
{!OrderDetailStr}

               TERM   #                                                 {!Term}
               USERS  #                                                 {!Users}

               DEALER NAME                                      {!DealerName}
               DEALER REP NAME                             {!DealerRepName}
               Dealer E-MAIL                                       {!DealerEmail}
               DEALER PHONE #                                 {!DealerPhone}
               SCHOOL NAME                                     {!SchoolName}
               SCHOOL ADMIN                                   {!SchoolAdmin} 
               ADMIN E-MAIL                                     {!AdminEmail}
               ADMIN PHONE #                                  {!AdminPhone}

--------------------------------------------------------------------------------------
  • Is this an HTML e-mail template? – Dan Jones Oct 23 '15 at 11:09
  • No.I have selected text email template – Ankita Singh Oct 23 '15 at 11:23
1

Although not strictly a Salesforce question as this really is to do with HTML & CSS styling for Emails.

You've stated in a comment that:

I have selected text email template

Presumably you've used spaces or tabs to separate the content which is really bad practice. Gmail, Yahoo, Hotmail etc... Will all be subject to their own CSS and styling. The only way to override this would be to use an HTML/CSS based e-mail template.

The caveat to doing this is that e-mail templates aren't quite as sophisticated as you'd expect. You'd need to use tables an inline styling or "code like it's 1995".

  • So i need to use HTML template?? – Ankita Singh Oct 23 '15 at 12:39
  • 1
    To ensure it's displayed how you want it to be, yes. :) Imagine text as the plainest fallback possible if, for some reason, your HTML doesn't get through or isn't supported by a particular client. – Dan Jones Oct 23 '15 at 13:28
  • I wrote a html in which i am using table to display the content so that its allined in all the webmails..but the problem is still same..its looks mesy – Ankita Singh Nov 2 '15 at 11:16
  • @AnkitaSingh You can add inline CSS too as needed to make the content look better. – Keith C Nov 2 '15 at 11:20
  • The problem is outlook is showing the text version of the template.Its not showing the HTML version of the template – Ankita Singh Nov 2 '15 at 12:01
1

It looks like you have tuned your template to align the data well in Outlook which is using a font where the character widths vary (proportional font). Other email clients use a font where each character is of the same width (fixed-width font). It is not possible to have a plain text template that aligns well in both situations.

A common approach is to layout the text email for fixed-width and also include a HTML version of the template so you can better control alignment in most/all modern email clients. Those clients typically present the HTML in preference to the plain text when both are present.

  • So i need to use HTML template?? – Ankita Singh Oct 23 '15 at 12:39
  • @AnkitaSingh If you want precise formatting then yes. – Keith C Oct 23 '15 at 13:14
  • I wrote a html in which i am using table to display the content so that its allined in all the webmails..but the problem is still same..its looks mesy – Ankita Singh Nov 2 '15 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.