2017-08-12 63 views
1

基於SendGrid文檔這裏https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/personalizations.html#-Sending-the-same-Email-to-Multiple-Recipients如何使用TO字段向SendGrid上的多個收件人發送1封電子郵件?

一個電子郵件發送給多個TO將導致:

這些收件人都將能夠看到電子郵件對方。

除此之外,你可以使用BCC來發送電子郵件,以旁路收件人看到接收方B等

所以,如果你有5000個的電子郵件的電子郵件地址,並希望收件人通過在To上查看他的電子郵件地址來獲取它是爲了讓您的代碼循環,併發送5000個呼叫到SendGrid。

當我看到Crunchbase時事通訊時,我想到了這個問題。

這是我丟失的東西嗎?

{ 
    "personalizations": [{ 
     "to": [{ 
      "email": "[email protected]" 
     }, { 
      "email": "[email protected]" 
     }, { 
      "email": "[email protected]" 
     }], 
     "substitutions": { 
      "%fname%": "recipient", 
      "%CustomerID%": "CUSTOMER ID GOES HERE" 
     }, 
     "subject": "YOUR SUBJECT LINE GOES HERE" 
    }] 
} 

enter image description here

+0

你可以嘗試爲每個收件人創建一個單獨的個性化對象。理論上他們在這種情況下不應該看到對方。 –

回答

0

personalizations是一個列表,拆分收件人那裏,沒有內部to。即

{ 
    'personalizations': [ 
     {'to': [{'email': '[email protected]', 'name': 'Foo'}]}, 
     {'to': [{'email': '[email protected]', 'name': 'Bar'}]} 
    ] 
} 
相關問題