FWH & Text Messages

FWH & Text Messages

Postby TimStone » Thu Aug 21, 2014 4:59 pm

Has anyone tried sending text messages from FWH ? Some of my clients would like to do that from the application I provide.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH & Text Messages

Postby Gale FORd » Thu Aug 21, 2014 5:31 pm

All carriers have an email address you can send the message to and it automatically converts it to text message for delivery. We like this method because it goes through our email system so there is a copy in sent folder and email archive.

Here is some info I send users on a regular basis.
Here is a link that lists most carriers email/text message addresses: http://www.hurt911.org/investigation/sms-text-message-address.html

You can send an email from Outlook to someone’s phone as a text message, and you can have someone send a text message from their phone to an email address.

Example 1 Send email to text on person’s phone with AT&T account:
Send the email to phonenumber@txt.att.net and it will be automatically converted to text message and sent to their phone.
Make sure you send your email in a plain text format with no attachments.
You can find out what address to use by having that person send a text to your email account (see example 2 below). When it arrives in your inbox you can see the return address.
• Alltel: phonenumber@message.alltel.com
• AT&T: phonenumber@txt.att.net
• T-Mobile: phonenumber@tmomail.net
• Virgin Mobile: phonenumber@vmobl.com
• Sprint: phonenumber@messaging.sprintpcs.com
• Verizon: phonenumber@vtext.com
• Nextel: phonenumber@messaging.nextel.com
• US Cellular: phonenumber@mms.uscc.net
• Cricket: phonenumber@sms.mycricket.com
For a complete list you can go here: http://www.hurt911.org/investigation/sm ... dress.html or http://en.wikipedia.org/wiki/List_of_SMS_gateways

Example 2 - person send text message to someone’s email account:
Fire up SMS on your phone, but instead of entering in a number you want to text, enter an email address. Any email address. Compose your text like normal, hit Send, and your carrier will automatically convert your text msg. to an email and deliver it to their inbox.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: FWH & Text Messages

Postby George » Thu Aug 21, 2014 5:47 pm

Tim,
As explained by Gale you can send "messages" to phone number by using the below code and SMTP FW Class.
This is free but you need to know the recipient's carrier.

Alternatively you can send through Skype with only knowing the recipient's phone number, but Skype charges 11.2 cents for each message sent.

Regards,

George
Code: Select all  Expand view

 FUNCTION SendSMSByPC()
    LOCAL cMessage, cPhone, cSubject, cCarrier

    cMessage := "Hello world!"
    cPhone := "9999999999" // 10 Digits phone number for USA phones
    cSubject := "Sending SMS from my PC"
    cCarrier := "@txt.att.net" // For AT&T
    cRecipient := cMyPhone + cCarrier

    SendSMSEmail(cRecipient, cMessage, cSubject)
 RETURN (.T.)


 FUNCTION SendEmailSMS(cRecipient, cMessage, cSubject)
    LOCAL oOutMail, cIP

    oWnd:SetMsg( "Sending SMS..." )
    WSAStartup()
    syswait(.25)
    oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.comcast.net" ), 587, TRUE, "UserName", "Password" )
    oOutMail:bConnecting = { || oWnd:SetMsg( "Connecting to smtp.comcast.net..." ) }
    syswait(.25)
    oOutMail:bConnected  = { || oWnd:SetMsg( "Connected" ) }
    syswait(.25)
    oOutMail:bDone       = { || oWnd:SetMsg( "Message sent successfully" ) }
    oOutMail:SendMail( "YourEmail@comcast.net",; // From
        { cRecipient },;                          // To
        cMessage,;                                // Msg Text
        cSubject,;                                // Subject
        { "" } )                                  // attached files
        syswait(.25)

RETURN NIL
 
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm

Re: FWH & Text Messages

Postby TimStone » Thu Aug 21, 2014 6:08 pm

Thanks. I'm aware of that method but the downside is knowing the carrier.

I thought I would ask to see if anyone had something more current or direct. Implementing that methodology is not a problem since I have the email setup already in place.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH & Text Messages

Postby Gale FORd » Thu Aug 21, 2014 7:03 pm

I think there is a free add on to Outlook called Outlook Mobile Service. I have not used it but supposedly you can send text messages from Outlook. Here is more info: http://office.microsoft.com/en-us/outlook-help/introduction-to-outlook-mobile-service-HA010107892.aspx
With that add on you might be able to use Ole or Mapi to send through outlook.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: FWH & Text Messages

Postby TimStone » Thu Aug 21, 2014 7:20 pm

That is for Outlook 2007. It doesn't appear to be supported in more recent versions.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH & Text Messages

Postby rhlawek » Thu Aug 21, 2014 11:39 pm

Tim,

I'm not sure it is applicable to your needs but there is a FWH example for using whatsapp, \fwh\samples\whatsapp.prg

I've never tried this sample, I'm not sure what it can or cannot do.

Robb
User avatar
rhlawek
 
Posts: 193
Joined: Sun Jul 22, 2012 7:01 pm

Re: FWH & Text Messages

Postby Antonio Linares » Fri Aug 22, 2014 12:43 am

Robb, Tim,

It seems as the whatsapp protocol changed a few times since then making it unusable
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH & Text Messages

Postby anserkk » Fri Aug 22, 2014 4:19 am

Dear Mr.Tim,

There are many SMS service providers. The SMS data is sent from your PC via internet to the service provider's gateway. From the SMS providers gateway it will be send to individual mobile phones. Once you buy their package they will provide an API to access their gateway.

Using FWH, you can send SMS from your app using
Code: Select all  Expand view

CREATEOBJECT('WinHttp.WinHttpRequest.5.1')
 



Regards
Anser
User avatar
anserkk
 
Posts: 1329
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Otto and 90 guests