Skip to content

Instantly share code, notes, and snippets.

@mplacona
Last active September 13, 2016 15:20
Show Gist options
  • Save mplacona/357bcbcdca3a1070de70de36563236c5 to your computer and use it in GitHub Desktop.
Save mplacona/357bcbcdca3a1070de70de36563236c5 to your computer and use it in GitHub Desktop.
using System.Web.Mvc;
using Twilio.TwiML;
using Twilio.TwiML.Mvc;
namespace ReceiveSms.Controllers
{
public class SmsController : TwilioController
{
// POST: Sms
[HttpPost]
public ActionResult Index(string From, string Body)
{
var twiml = new TwilioResponse();
var message = twiml.Message($"Hello {From}. You said {Body}");
return TwiML(message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment