젠드 응용 프로그램에서 sendgrid를 통해 전자 메일을 보내려고합니다. 나는 sendgrid 문서 (smtapi 클래스와 swift)에서 php 코드를 복사한다.Sendgrid에서 섹션 헤더 사용
% variable %로 대체해야하는 작업 영역이있는 템플릿을 만듭니다. 결과에서 http://docs.sendgrid.com/documentation/api/smtp-api/developers-guide/
는 뭔가 같은보고를 얻을 : 여기에 정의 된 바와 같이 지금은 sendgrid에 대한 헤더를 만들
{
"to": ["[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"],
"sub": {"%firstname%": ["Benny", "Chaim", "Ephraim", "Yehuda", "will"]},
"section": {"%postername%": "John Doe", "%postermail%": "[email protected]", "%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/