ios - iPhone 上设置的电子邮件签名在其他客户端中呈现为更大的字体大小

标签 ios macos email html-email

我使用 MacOs Sierra Mail 创建了以下电子邮件签名。

Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
    charset=us-ascii
Message-Id: <25BE5C1D-06F0-4554-9226-A293B8E402CB>
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))

<body style="padding:0;font-size:12px;font-family: Helvetica, Arial, sans-serif;font-weight:bold;word-wrap: break-word; -webkit-line-break: after-white-space;">
<br />
<br />
<br />

<p style="margin:0;padding:0;color:#6C5AB6;font-size:12px;font-weight:bold;font-family: Helvetica, Arial, sans-serif;">My Name</p>
<p style="margin:0;padding:0;color:#6C5AB6;font-size:12px;font-weight:bold;font-family: Helvetica, Arial, sans-serif;">Job Title</p>
<a href="tel:+555555555" style="display:block;margin:0;padding:0;text-decoration:none !important;border:none !important;color:#000000;font-size:12px;font-weight:bold;font-family: Helvetica, Arial, sans-serif;">+555555555 </a>
<br />
<p style="margin:0;padding:0;color:#000000;font-weight:bold;font-size:12px;font-family: Helvetica, Arial, sans-serif;text-decoration:none !important;">Address Line 1</p>
<p style="margin:0;padding:0;color:#000000;font-weight:bold;font-size:12px;font-family: Helvetica, Arial, sans-serif;text-decoration:none !important;">Address Line 2</p>
<a  href="#" style="margin:0;padding:0;color:#000000;border:none !important;text-decoration:none !important;font-weight:bold;font-size:12px;font-family: Helvetica, Arial, sans-serif;">mywebsite.com</a>
<br />
<br />
<br />
<br />

<a href="#" style="border:none !important";><img src="signature_photo.png" style="height:90px;width:383px"></></a>

<p style="margin:40px 0;padding:0;font-family: Helvetica, Arial, sans-serif;color:#919191;font-weight:300;font-size:10px;width:100%;">PRIVILEGED - PRIVATE AND CONFIDENTIAL. This communication and any files transmitted with it, are intended solely for the named addressee(s) only and may contain information which is confidential, legally privileged and are subject to copyright. No part of this email can be reproduced without consent of the Copyright owner. If you receive this email and you are not the addressee, intended recipient (or responsible for the delivery of the email to the addressee), please do not read, use, distribute or copy this email. Please delete the email and notify the author immediately.</p>
</body>

html 在此客户端以及 Gmail 中按预期呈现。但是,由于我想在我的 iOS 邮件中设置相同的 html 签名,因此我遵循 this guide 。 它建议(1)复制iOS邮件中收到的签名,(2)将其粘贴到“设置”>“邮件”>“签名”中,以及(3)在粘贴后立即调用并撤消签名,以避免iOS包含破坏格式的额外代码。

在 iPhone 预览版和通过手机发送的电子邮件中,这一切看起来都应该是这样,但在发送一些测试电子邮件后,我意识到 OSX Mail 和 Gmail 都以 17px 的字体大小呈现签名内联 CSS 中指定的 12px。

最初,我在正文标记中指定了字体大小规范,但现在我已将其包含在每一行中,希望它可以解决问题,但事实并非如此。

任何有关为什么会发生这种情况的线索将不胜感激。

最佳答案

iOS 可以自动缩放文本。苹果有时会添加/删除/更改邮件内的缩放机制,这可能会使样式化的电子邮件代码陷入循环。将其添加到 <head>应完全禁用自动缩放。

<meta name="x-apple-disable-message-reformatting">

More on this bug .


不确定 Gmail 出现问题的原因是什么,但您是否尝试过在 <head> 中添加视口(viewport)?

<meta name="viewport" content="width=device-width">

关于ios - iPhone 上设置的电子邮件签名在其他客户端中呈现为更大的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45438010/

相关文章:

ios - 无法在不同的方案 xcode 中使用嵌入式二进制文件

ios - 在UITableView上获取触发的自定义UIButton并避免点击表行

ios - 如果我的应用仅以只读方式访问联系人数据,我是否需要请求读取联系人数据的权限?

c# - 如何使用单声道在 mac 控制台上编译单个 c# 文件?

php - 无法使用 PHP 连接到 IMAP

ios - Swift 数组对象消失

objective-c - 简单的进度条不更新

Java OSX MessageDigest.getInstance ("MD5") 挂起

php - 发送电子邮件时是否需要换行?

ios - 如何通过 MFMailComposer 发送链接?