質問 1: ドキュメントに記載されている X-SMTPAPI ヘッダー関連の順序を定義する際、厳密に順序に従う必要がありますか?
ドキュメント(http://sendgrid.com/docs/API_Reference/SMTP_API/)には、次のように記載されています。
{
"to": [
"ben@sendgrid.com",
"joe@sendgrid.com"
],
"sub": {
"%name%": [
"Ben",
"Joe"
],
"%role%": [
"%sellerSection%",
"%buyerSection%"
]
},
"section": {
"%sellerSection%": "Seller information for: %name%",
"%buyerSection%": "Buyer information for: %name%"
},
"category": "Orders",
"unique_args": {
"orderNumber": "12345",
"eventID": "6789"
},
"filters": {
"footer": {
"settings": {
"enable": 1,
"text/plain": "Thank you for your business"
}
}
}
}
So, my email header in this case would look like the following in coldfusion:
<cfset myheaderdefinition = XMLFormat('X-SMTPAPI|{
"to": [
"ben@sendgrid.com",
"joe@sendgrid.com"
],
"sub": {
"%name%": [
"Ben",
"Joe"
],
"%role%": [
"%sellerSection%",
"%buyerSection%"
]
},
"section": {
"%sellerSection%": "Seller information for: %name%",
"%buyerSection%": "Buyer information for: %name%"
},
"category": "Orders",
"unique_args": {
"orderNumber": "12345",
"eventID": "6789"
},
"filters": {
"footer": {
"settings": {
"enable": 1,
"text/plain": "Thank you for your business"
}
}
}
}
') >
質問 2: ヘッダーを定義した方法は適切ですか?
質問 1 の詳細:
1.1 to、sub、role、section などは上記と同じ順序で使用する必要がありますか? または、これらを使用していない場合、これらのいずれかをスキップできますか?
1.2 sendgrid が unique_args やその他のフィールドに何を期待しているかを判断するにはどうすればよいですか?