AMP

AMP メールの構造とレンダリング

Important: this documentation is not applicable to your currently selected format websites!

メールは MIME ツリーとして構造化されています。この MIME ツリーにはメッセージ本文とメールの添付ファイルが含まれます。

メール内に AMP を埋め込むには、コンテンツタイプ text/x-amp-html の新しい MIME パートを multipart/alternative の子孫として追加します。既存の text/html または text/plain パートとともに存在する必要があります。こうすることで、メールメッセージがすべてのクライアントで機能するようにすることができます。

multipart/alternative サブタイプについての詳細は、RFC 1521, section 7.2.3 を参照してください。

追加情報

text/x-amp-html パートは、multipart/alternative ノードにネストされている必要があります。メールには、multipart/alternative ノードの text/x-amp-html パートを 2 つ以上含めることはできません。

multipart/alternative には、text/x-amp-html ノードのほかに、1 つ以上の非 AMP(text/plain または text/html)ノードが必要です。これは、メールクライアントが AMP をサポートしない場合、またはユーザーがメールプロバイダの設定で AMP をオプトアウトしている場合に表示されます。

一部のメールクライアント[1] は最後の MIME パートのみをレンダリングするため、text/x-amp-html MIME パートを text/html MIME パートのに配置することをお勧めします。

返信/転送のセマンティック

メールクライアントは、ユーザーが AMP メールメッセージに返信またはそれを転送する際に、MIME ツリーから text/x-amp-html を取り除きます。

有効期限

30 日などのある一定の期間が過ぎると、メールクライアントはメールの AMP 部分を表示しなくなることがあります。この場合、メールはtext/html または text/plain パートを表示するようになります。

 From:  Person A [persona@example.com](mailto:persona@example.com) To: Person B [personb@example.com](mailto:personb@example.com) Subject: An AMP email! Content-Type: multipart/alternative; boundary="001a114634ac3555ae05525685ae"

--001a114634ac3555ae05525685ae Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes

Hello World in plain text!

--001a114634ac3555ae05525685ae Content-Type: text/x-amp-html; charset="UTF-8"

<!doctype html>

    <meta charset="utf-8">   <style amp4email-boilerplate="">body{visibility:hidden}</style>   <script async="" src="https://cdn.ampproject.org/v0.js"></script>   Hello World in AMP!   --001a114634ac3555ae05525685ae Content-Type: text/html; charset="UTF-8"

<span>Hello World in HTML!</span> --001a114634ac3555ae05525685ae--