0

我正在使用 sparkpost 的 java api。当我尝试向同一个电子邮件地址发送电子邮件时,我遇到了这种奇怪的行为。这在这里有效:

       Client client = new Client("apikey");
String emailfrom="info@example.com";
client.sendMessage(emailfrom,"info@example.com","subject",null,"html");

但是这里没有

client.sendMessage(emailfrom,emailfrom,"subject",null,"html");

任何提示为什么会发生这种情况?当我有不同的地址时,它可以双向工作:我可以首先将我的字符串存储到一个变量中,然后将它传递给函数。但是当它是相同的地址时,它会返回关于错误收件人的错误

{ "errors": [ { "message": "At least one valid recipient is required", "code": 5002 } ] }(Bad Request)
4

0 回答 0