Creating email alert using Matlab, but getting error

4 visualizaciones (últimos 30 días)
Mthunzi Booi
Mthunzi Booi el 13 de En. de 2020
Respondida: Christopher Stapels el 14 de En. de 2020
Hi Team
I am trying to create native code for matlab analysis about email alert. But i am getting an error below and my code is below. Question which API key must be supplied here? The Alert API Key both on my Matlab and PostMan? I am following this link below and note my channel is set under settings as private channel.
data = thingSpeakRead(929272, "NumMinutes", 100);
aveTemp = mean(data(:,7));
apiKey = '****';
alertURL = "https://api.thingspeak.com/alerts/send";
options = weboptions("HeaderFields",["ThingSpeak-Alerts-API-Key", apiKey]);
alertBody = sprintf("The temperature is %0.2fF.", aveTemp);
if avg_temperature > 60.0
webwrite(alertURL, "body", alertBody, "subject", alertSubject, options);
end

Respuestas (2)

Selva Karna
Selva Karna el 14 de En. de 2020
Check inbuilt funciton
  1 comentario
Rik
Rik el 14 de En. de 2020
It is probably more helpful to provide a link to the doc page, or at least the name of the builtin function you mean. Did you mean sendmail?

Iniciar sesión para comentar.


Christopher Stapels
Christopher Stapels el 14 de En. de 2020
change avg_temperature to aveTemp.

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Categorías

Más información sobre ThingSpeak en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by