sendSMS method
Implementation
Future<String> sendSMS({
required String from,
required String to,
required String text,
required String smsSecretKey,
})async{
Map<String,dynamic> mySMS = {
"Text" : text,
"From" : from,
"To" : to,
};
String response = await SexyAPI(
url: "https://$apiKey:$secretKey@api.mailjet.com",
path: "/$smsAPIversion/sms-send",
parameters: {},
).post(
headers: {
"Content-Type" : "application/json",
"Authorization" : "Bearer " + smsSecretKey,
},
body: jsonEncode(mySMS),
);
return response;
}