2015-08-06 2 views

Répondre

2

En supposant que tout est sur la plate-forme Windows,

  • mettre en œuvre une API SMS en utilisant votre C# et SMPP
  • Activez le xp_cmdshell en exécutant sp_configure
  • Installer cURL
  • Execute commande curl de votre requête

    DECLARE @Command varchar(1024) = 'curl http://mydotNetAPI/sms -d number=959401591181 -d "message=hello from sql server"' 
    EXEC MASTER.dbo.xp_cmdshell @Command 
    

Remarque: http://mydotNetAPI/sms doit être votre API C# pour relayer un message SMS.

Ou vous devez essayer http://textbelt.com/text qui est une API SMS sortante gratuite.

par exemple.

$ curl -X POST http://textbelt.com/text \ 
    -d number=5551234567 \ 
    -d "message=I sent this message for free with textbelt.com" 

Ref: https://github.com/typpo/textbelt

+0

Salut. C'est une bonne solution. Je le ferai . Merci :) –