Sending a Text Message from SQL Server

Sending a Text Message from SQL Server

Sending a text message from SQL Server is actually pretty easy. I had no idea, but text messages go just like a standard email does. As long as you know your service provider’s smtp host, you can use the MSDB..sp_send_dbmail proc and put the recipient as their phone number @smtp_provider.com i.e. “8888675309@vtext.com”

Here is the link to the code. It currently works for the US big 4 (Verizon/ATT/TMoble/Sprint). Note, if you do not have database mail enabled, you will first need to do that. Here is the BOL link for database mail: https://docs.microsoft.com/en-us/sql/relational-databases/database-mail/configure-database-mail

SQL Server Text Message Code – Enjoy!

usp_send_text_msg

Leave a Reply

Your email address will not be published. Required fields are marked *