我正在使用 SendInBlue Java Api 发送电子邮件,我在 Scala 中编写了这段代码:
object SendInBlueApi extends App{
val http : Sendinblue= new Sendinblue("https://api.sendinblue.com/v2.0","API_KEY");
var data: Map[String, Any]= Map[String, Any]()
data += ("to" -> "test1@gmail.com")
data += ("from" -> "test2@gmail.com")
data += ("subject" -> "My subject")
data += ("text" -> "This is text")
val str = http.send_email(data)
println(str.toString)
}
但我收到此错误: {"code":"failure","message":"valid 'to' email address required","data":[]}