我试图使用C#Windows应用程序将gmail帐户的免费短信发送至airtel移动(在卡纳塔克邦)。该消息已发送,我可以看到已发送的项目,但未被手机接收。通过短信网关发送电子邮件,但未收到
这是我的代码,
SmtpClient smtp = new SmtpClient();
smtp.Credentials = new NetworkCredential("[email protected]", "activedust");
smtp.Port = 587;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
MailMessage message = new MailMessage();
message.To.Add("[email protected]");//replace no with airtel mobile number in Karnataka
message.From = new MailAddress("[email protected]", "App",System.Text.Encoding.UTF8);
message.Body = "type your body";
message.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
smtp.send(message);
我可以给emaill成功使用此代码,但对于短信不能正常工作
尝试发送电子邮件到其他地方,以检查它是否实际收到为en电子邮件而不是短信 – 2012-02-07 07:37:16
电子邮件到短信网关是可靠地提供邮件臭名昭着的糟糕。您很可能被运营商阻止或标记为垃圾邮件。 – 2012-02-08 09:45:55
您不需要使用[smtp]的任何帐户(https://fr.wikipedia.org/wiki/Wikipédia:Oracle/semaine_43_2013#Envoyer_un_SMS_par_e-mail“只需查看会话示例;您无需了解法语为了它”)。 – user2284570 2013-12-29 13:17:20