我希望使用发送网格通过短信网关发送短信。 我正在使用以下代码发送短信。
var sendgrid_message = new SendGridMessage();
sendgrid_message.AddTo(toNumber@domainname);
//set the sender
sendgrid_message.From = new MailAddress(from_address);
//set the message body
// sendgrid_message.Html = message;
sendgrid_message.Html = string.Format(" ");
//set the message subject
sendgrid_message.Subject ="The profile has been updated successfully. If you have not done this, please contact administrator.";
sendgrid_message.Text = "The profile has been updated successfully. If you have not done this, please contact administrator.";
//create an instance of the Web transport mechanism
var transportInstance = new Web(new NetworkCredential(username, password));
//send the mail
await transportInstance.DeliverAsync(sendgrid_message);
但我没有收到短信中的完整内容。 我按照以下方式收到了消息
'The profile has been updated successfully. If you '
即使我也使用SMTP,我也没有获得完整的内容。
我哪里错了?
我是否需要按照其他方式发送短信?
请告诉我。