2

I am creating an HTML Email template using HandlebarsJS.

I am having an issue that when I open the Email on mobile (outlook or gmail) - when I click on a number it opens a link to start a phone call?

for example: 166.43 would open as a clickable link on mobile.

How can I ensure that numbers do not do this in my email?

Relevant HTML Section:

 <td style="padding: 10px;font-family: Arial;font-size: 13px;font-weight: normal;font-stretch: normal;font-style: normal;line-height: 1.45;letter-spacing: normal;color: #333333;height: 30px;transition: all 0.3s;background: #FAFAFA;text-align: left; border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;">{{cost}}</td>
java12399900
  • 1,485
  • 7
  • 26
  • 56

1 Answers1

1

A bit late, but for anyone else struggling with this annoying issue: I found several approaches based on answers to questions like this one that deals with Safari, and others dealing with zero-width characters--that would work when I viewed the email on my phone but not in Outlook on my computer, and vice-versa; the one that finally worked on both was:

<a style=\"text-decoration:none;\" href=\"#\"><font color=\"000000\">".$partNumber."</font></a>

where $partNumber is my 7-digit php variable that kept being interpreted as a phone number in the email, and everything is escaped the way I had to in my server document. Of course this is a work-around, and if people click/hover-over/touch on the number they'll get some sort of platform-based response, but visually this works. Hope it helps.

kwishnu
  • 1,730
  • 19
  • 17