Anybody done a simple app that sends text messages to customers? I'm talking a simple database with name, phone number, email, and you send a specific message to the list. Example: you want to alert customers scheduled to come in to your business that it's closed (let's say due to avalanche).
I have notes from YEARS ago where it was something like phonenumber@txt.att.net. Here's a lookup table I made back in 2009 regarding it: https://www.screencast.com/t/DUVsmmtd
I know there are services like txtNation (http://www.txtnation.com/). I don't want to reinvent the wheel so I'd like to hear from those who have done this already.
tia, --Mike
Mike being a big VFP guy, I'd send him to https://github.com/VFPX/TwilioX
😊
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Malcolm Greene Sent: Thursday, July 06, 2017 4:10 PM To: profoxtech@leafe.com Subject: Re: SMS (text messaging)
Hi Mike,
Twilio.com or Nexmo.com.
Malcolm
I've used both twilio and nexmo so can give you code for either.
On 6 July 2017 16:03:26 GMT-04:00, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
Anybody done a simple app that sends text messages to customers? I'm talking a simple database with name, phone number, email, and you send a specific message to the list. Example: you want to alert customers scheduled to come in to your business that it's closed (let's say due to avalanche).
I have notes from YEARS ago where it was something like phonenumber@txt.att.net. Here's a lookup table I made back in 2009 regarding it: https://www.screencast.com/t/DUVsmmtd
I know there are services like txtNation (http://www.txtnation.com/). I don't want to reinvent the wheel so I'd like to hear from those who have done this already.
tia, --Mike
[excessive quoting removed by server]
https://martinfitzpatrick.name/list-of-email-to-sms-gateways/
go to that link and have a look at it. it should give you the email to text gateway to just about every carrier.
------ Original Message ------ From: "Frank Cazabon" frank.cazabon@gmail.com To: profoxtech@leafe.com Sent: 7/6/2017 2:22:38 PM Subject: Re: SMS (text messaging)
I've used both twilio and nexmo so can give you code for either.
On 6 July 2017 16:03:26 GMT-04:00, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
Anybody done a simple app that sends text messages to customers? I'm talking a simple database with name, phone number, email, and you send a specific message to the list. Example: you want to alert customers scheduled to come in to your business that it's closed (let's say due to avalanche).
I have notes from YEARS ago where it was something like phonenumber@txt.att.net. Here's a lookup table I made back in 2009 regarding it: https://www.screencast.com/t/DUVsmmtd
I know there are services like txtNation (http://www.txtnation.com/). I don't want to reinvent the wheel so I'd like to hear from those who have done this already.
tia, --Mike
[excessive quoting removed by server]
On 2017-07-06 16:38, Brian wrote:
https://martinfitzpatrick.name/list-of-email-to-sms-gateways/
go to that link and have a look at it. it should give you the email to text gateway to just about every carrier.
Thanks, Brian. Yes, that shows the ones I listed in that screenshot earlier (and of course gazillion more!).
here's my sendsmsvianexmo.prg
LPARAMETERS tcPhoneNumber, tcMessage
NexmoKey = ALLTRIM(oAppInfo.SMSProviderKey) NexmoSecret = ALLTRIM(oAppInfo.SMSProviderSecret) NexmoNumber = ALLTRIM(oAppInfo.SMSProviderNumber)
m.lcNexmoUrl = TEXTMERGE(oAppinfo.SMSProviderURL)
TrySendSMS(m.tcPhoneNumber, m.tcMessage, m.lcNexmoUrl)
Procedure TrySendSMS(tcPhone,tcMessage, tcNexmoUrl)
tcMessage = Strtran(m.tcMessage, '%0A', '%0D%0A') lcUrl = Chrtran(; Textmerge("<< m.tcNexmoUrl >>|to=<< m.tcPhone >>|text=<< m.tcMessage >>"), '|', Chr(38)) Local loXmlHttp As "Microsoft.XMLHTTP" loXmlHttp = Newobject( "Microsoft.XMLHTTP" ) loXmlHttp.Open( "POST" , m.lcUrl, .F. ) loXmlHttp.Send( )
XMLTOCURSOR(loXmlHttp.responsetext, "SMSResult", 512) *!* BROWSE NORMAL && 200 success code *!* ? loXmlHttp.responsetext RETURN loXmlHttp.Status = 200 Endproc
This is my SendSMSViaTwilio.prg
LPARAMETERS tcPhoneNumber, tcMessage
m.lcURL = TEXTMERGE(oAppinfo.SMSProviderURL)
m.lcTo = m.tcPhoneNumber m.lcFrom = oAppinfo.SMSProviderNumber m.AccountSID = oAppInfo.SMSProviderKey m.AuthToken = oAppInfo.SMSProviderSecret
m.lcString = [From=] + m.lcFrom ; + [&To=] + m.lcTo; + [&Body="] + m.tcMessage + ["]
loHTTP = CREATEOBJECT("WinHttp.WinHttpRequest.5.1") loHTTP.Open("POST", m.lcUrl , .F.) loHTTP.SetCredentials(AccountSID, AuthToken, 0) loHTTP.SetRequestHeader("content-type", "application/x-www-form-urlencoded") loHTTP.Send(m.lcString)
XMLTOCURSOR(loHttp.responsetext, "SMSResult", 0)
IF FILE("debug.txt") STRTOFILE(loHttp.responsetext, "Twilio Log.xml", 0) ENDIF
* not sure how I check for success!
RETURN .T.
SET LIBRARY TO vfpconnection.fll ADDITIVE
*!* ?HttpSimplePost("https://api.twilio.com/2010-04-01/Accounts/" + AccountSID + "/Messages/" + AuthToken + ".json", m.lcjson, "", "MyTrace()")
*!* RETURN
*!* SetConnectTimeout(oAppInfo.ConnectTimeOut) && Default is 10 seconds *!* SetResponseTimeout(oAppInfo.ResponseTimeOut) && Default is 10 seconds SetConnectTimeout(30) && Default is 10 seconds SetResponseTimeout(30) && Default is 10 seconds
*!* https://api.twilio.com/2010-04-01/Accounts/ACb832550f3d5e416b54a3ff1c0c7d08b... \ *!* -d "Body=Jenny%20please%3F%21%20I%20love%20you%20<3" \ *!* -d "To=%2B15558675309" \ *!* -d "From=%2B14158141829" \ *!* -d "MediaUrl=http://www.example.com/hearts.png" \ *!* -u 'ACb832550f3d5e416b54a3ff1c0c7d08b1:{AuthToken}'
m.lcURL = "https://api.twilio.com/2010-04-01/Accounts/" + AccountSID + "/Messages/.json"
*!* "https://api.twilio.com/2010-04-01/Accounts/ACaaff12cbe9e61de8b2425620cf2c26c..." &&oAppInfo.PostClaimDocumentURL
LOCAL ARRAY laPost[3,2] laPost[1,1] = "Body" laPost[1,2] = "Test Message from Frank via Twilio" laPost[2,1] = "To" && name laPost[2,2] = "+18683766400" laPost[3,1] = "From" && name laPost[3,2] = "+18683766400"
IF NOT HttpPost(m.lcURL, @laPost, "", "APITrace()") MESSAGEBOX("An error occurred sending the SMS: " + m.cTraceData, 16, "Send SMS Via Twilio") ENDIF
*********************** FUNCTION APITrace() && Callback from the FLL - used to provide a detailed trace of the operation *********************** *!* You can create your own function, procedure or method to handle this and name it whatever you want. *!* The nTraceDataType and cTraceData are private variables created on-the-fly by the FLL #DEFINE TYPE_TEXT 0 #DEFINE TYPE_HEADER_IN 1 #DEFINE TYPE_HEADER_OUT 2 #DEFINE TYPE_DATA_IN 3 #DEFINE TYPE_DATA_OUT 4 #DEFINE TYPE_SSL_DATA_IN 5 #DEFINE TYPE_SSL_DATA_OUT 6 #DEFINE TYPE_END 7 lcMessage = ICASE(m.nTraceDataType = TYPE_TEXT, "STATUS:", ; m.nTraceDataType = TYPE_HEADER_IN, "<RECV HEADER: ", ; m.nTraceDataType = TYPE_HEADER_OUT, ">SEND HEADER: ", ; m.nTraceDataType = TYPE_DATA_IN, "<RECV DATA: ", ; m.nTraceDataType = TYPE_DATA_OUT, ">SEND DATA: ", ; m.nTraceDataType = TYPE_SSL_DATA_IN, "<RECV SSL DATA: ", ; m.nTraceDataType = TYPE_SSL_DATA_OUT, ">SEND SSL DATA: ", ; m.nTraceDataType = TYPE_END, "END: ", "UNKNOWN: ") m.lcMessage = m.lcMessage + m.cTraceData STRTOFILE(m.lcMessage, "Twilio.log", 1) ENDFUNC
Frank.
Frank Cazabon
On 07/07/2017 12:50 AM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-07-06 16:38, Brian wrote:
https://martinfitzpatrick.name/list-of-email-to-sms-gateways/
go to that link and have a look at it. it should give you the email to text gateway to just about every carrier.
Thanks, Brian. Yes, that shows the ones I listed in that screenshot earlier (and of course gazillion more!).
[excessive quoting removed by server]
Not that this may be much help. But, if I am not mistaken - our late friend Sytze had done Texting Messaging SW within his apps. Although - will admit - makes me a little sad to bring up his name. I always loved his interactions on this forum - and I know he sorely missed by many.
-K-
On 7/6/2017 4:03 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
Anybody done a simple app that sends text messages to customers? I'm talking a simple database with name, phone number, email, and you send a specific message to the list. Example: you want to alert customers scheduled to come in to your business that it's closed (let's say due to avalanche).
I have notes from YEARS ago where it was something like phonenumber@txt.att.net. Here's a lookup table I made back in 2009 regarding it: https://www.screencast.com/t/DUVsmmtd
I know there are services like txtNation (http://www.txtnation.com/). I don't want to reinvent the wheel so I'd like to hear from those who have done this already.
tia, --Mike
[excessive quoting removed by server]
On 2017-07-06 17:30, Kurt at VRFX wrote:
Not that this may be much help. But, if I am not mistaken - our late friend Sytze had done Texting Messaging SW within his apps. Although - will admit - makes me a little sad to bring up his name. I always loved his interactions on this forum - and I know he sorely missed by many.
-K-
Unless he's posted it somewhere publicly, it's of no use to the rest of us.
Yeah, he was a good Foxer.
Yes - understood & agreed.
-K-
Sent from my iPhone
On Jul 7, 2017, at 12:43 AM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-07-06 17:30, Kurt at VRFX wrote: Not that this may be much help. But, if I am not mistaken - our late friend Sytze had done Texting Messaging SW within his apps. Although - will admit - makes me a little sad to bring up his name. I always loved his interactions on this forum - and I know he sorely missed by many. -K-
Unless he's posted it somewhere publicly, it's of no use to the rest of us.
Yeah, he was a good Foxer.
[excessive quoting removed by server]