Zend アプリケーションで sendgrid を介してメールを送信しようとしています。sendgrid ドキュメント (smtapi クラスと迅速) から php コードをコピーします。
%variable% に置き換える必要がある場所を含むテンプレートを作成します。ここで定義されているように、sendgrid のヘッダーを作成します: http://docs.sendgrid.com/documentation/api/smtp-api/developers-guide/
その結果、次のようなものが得られます。
{
"to": ["mail1@domain.com", "mail2@domain.com", "mail3@domain.com", "mail4@domain.com", "sfwwnkff@sharklasers.com"],
"sub": {"%firstname%": ["Benny", "Chaim", "Ephraim", "Yehuda", "will"]},
"section": {"%postername%": "John Doe", "%postermail%": "james@doe.com", "%categoryname%": "General", "%threadname%": "Completely new thread", "%post%": "This thread is to inform you about something very important", "%threadurl%": "http:\/\/hb.local\/forums\/general\/thread\/143", "%replyto%": "http:\/\/hb.local\/forums\/general\/thread\/143", "%unsubscribeurl%": "http:\/\/hb.local\/forums\/settings\/", "%subscribeurl%": "http:\/\/hb.local\/forums\/subscribe-thread\/id\/143\/token\/1b20eb7799829e22ba2d48ca0867d3ce"}
}
「サブ」で定義されたすべてのデータが変更されている間、セクションを機能させることができません。最後の電子メールで、まだ %postername% を受け取りました。このデータをサブに移動し、メールごとに繰り返すと、すべて正常に機能します。
私が間違っていることを誰かが手がかりを持っていますか?
セクションのドキュメントはこちら: http://docs.sendgrid.com/documentation/api/smtp-api/developers-guide/section-tags/