Hello,
im trying to send an email in influxdb using mailjet.
I wrote it base on the example in documentation: Send alert email | InfluxDB Cloud Documentation
My code:
import “http”
http.post(url: “https://api.mailjet.com/v3.1/send”,
headers: {
“Content-Type”: “application/json”,
“Authorization”: “Basic MAILJET_APIKEY:MAILJET_SECRET_APIKEY”
},
data: bytes(v: “{
"Messages": [{
"From": {
"Email": "joe@example.com",
"Name": "Joe"
},
"To": [{
"Email": "john@example.com",
"Name": "John"
}],
"Subject": "Test",
"TextPart": "Test"
}]
}”))
Error i received:
error exhausting result iterator: error calling function “post” @5:1-18:11: Post “https://api.mailjet.com/v3.1/send”: read tcp 172.18.0.2:54682->35.187.79.8:443: read: connection reset by peer