如何创建 HTML 电子邮件以防止用户在复制粘贴时意外选择额外空格

问题描述 投票:0回答:1

我有一封电子邮件,其中包含一个需要一次性复制粘贴的字符串。

我遇到的问题是,很多用户并没有真正注意他们如何从 Outlook 中进行复制,并且似乎总是在末尾复制一个额外的空格。

我知道他们是如何做到的,我总是必须回溯才能正确复制它。最初的选择看起来像

在我回溯并更准确之后,它看起来像

我遇到的问题是,有相当多的人复制了该空间,然后遇到了问题。

这是我处理 html 区域的方式。有没有什么东西会触发这个问题,我可以更换它来改进。

<p style="margin-top: 0;">
 <span style="font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 14px; color:#222222; line-height: 1.6;"> 
  <span style="color: #222;">We have recently upgraded the security for accounts.</span>
  <br><br> To complete the account upgrade process, you will need to set up a new password. Below, you will find a temporary password that you can use to log in and create a new, stronger password of your choice. 
  <br><br> 
  <b>Temporary Password: 
   <span style="font-size: 22px; margin-left: 5px; border:1px solid #ccc; color: #222222; background-color: #ffffff; padding: 5px 10px; border-radius: 5px;">{####}</span>
  </b> 
 </span>
</p> 
html-email copy-paste
1个回答
0
投票

您可以将其设计为表格,因此将密码单独放在一个单元格中。

类似:

<table width="100%" cellpadding=0 cellspacing=0>
  <tr>
    <td style="padding: 5px 10px;>Temporary Password:</td>
    <td style="border:1px solid #ccc; padding:5px 10px;">{####}</td>
  </tr>
</table>
© www.soinside.com 2019 - 2024. All rights reserved.