Contact form: Phone redirect!?

8 replies
Hi Warriors (of the Techie type!)

I'm guessing this is the most appropriate place to put this question?

But I'm wondering if there is such a thing as being able to send a text to a Mobile (US=Cell ) phone from a contact form?

To clarify, what I'm after is; You got your standard online "contact us" or "Opt-in" form on a website....Peeps put in their Name and email address, phone No. etc and that can be fwd to your inbox, as a notification. So far, so good?

But as well as to your inbox, can a txt alert be sent to your Phone, letting you know you've had an enquiry?

Any help, gratefully received.

Terry
#contact #form #phone #redirect
  • Profile picture of the author leopi
    Sure, Google can help u solve any prob!
    {{ DiscussionBoard.errors[3161939].message }}
  • Profile picture of the author dwooding
    Terry,

    This is a php function that gets called when the form is submitted that sends a text to an iPhone (replace the capital letter "X" with a dollar sign).

    function text_results(Xcontent) {
    Xto = "8005551212@mms.att.net";
    Xfrom = "myemail@gmail.com";
    Xheaders = "Content-Type: text/plain; charset=us-asciinFrom: <".Xfrom.">nReply-To: <".Xfrom.">nReturn-Path: <".Xfrom.">nX-Mailer: PHP";
    Xsubject = "Sales";
    Xcontent = trim(strip_tags(Xcontent));
    mail(Xto, Xsubject, Xcontent ,Xheaders);
    return true;
    }
    Originally Posted by Sparksman View Post

    Hi Warriors (of the Techie type!)

    I'm guessing this is the most appropriate place to put this question?

    But I'm wondering if there is such a thing as being able to send a text to a Mobile (US=Cell ) phone from a contact form?

    To clarify, what I'm after is; You got your standard online "contact us" or "Opt-in" form on a website....Peeps put in their Name and email address, phone No. etc and that can be fwd to your inbox, as a notification. So far, so good?

    But as well as to your inbox, can a txt alert be sent to your Phone, letting you know you've had an enquiry?

    Any help, gratefully received.

    Terry
    Signature
    {{ DiscussionBoard.errors[3164839].message }}
  • Profile picture of the author Sparksman
    Thank you to all above... I will certainly check out King G!...and @dwooding a quick question?

    You say that PHP code sends to iphone, is that ONLY iphone?

    Thanks again all, much appreciated.

    Terry

    EDIT UPDATE: I've been told it also depends on your server provider? In my case Hostgator... they tell me they do not support this!!!
    {{ DiscussionBoard.errors[3173294].message }}
  • Profile picture of the author SteveJohnson
    Sparksman - what you're doing with @dwooding's code is sending an email to the phone, not sending an SMS message, so HostGator's lack of support for SMS doesn't matter.

    Yes, his code sends only to phones that can be addressed with @mms.att.net - iphones just happen to be, at the moment, only on the ATT service.

    The main issue with doing it this way is you'll need to know the phone number's service provider, so you'll have to ask. There's no way to guess. Then you'll match the service provider to a list of gateway addresses to determine where to send the email.

    There's an explanation here: How to send email to a phone « SMS 411 along with a list of provider addresses. The post is kind of old, but it will explain the concept behind emailing to a phone.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3175673].message }}
  • Profile picture of the author wayfarer
    The secret is, every major carrier has an email address for every phone number. For example, for Verizon it is phonenumber@vtext.com, for at&t it is phonenumber@txt.att.net

    Of course, if you don't know what carrier you're sending to, it is much more difficult. I've heard there are some APIs that have been developed for this purpose, but I've never looked into it.

    These email addresses are for sending regular text messages, not SMS or "email". I used it once a long time ago to send an alert to a business in response to a quote request, so that the owner in the field could call the customer immediately. Of course I knew exactly what carrier they had, so there was no need for an API.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[3177299].message }}
    • Profile picture of the author dereksemmler
      Maybe I have misunderstood the question but the OP is simply looking to have a text message sent to his own phone when someone submits the contact form. It might be easiest to simply setup the email address that receives notifications of a form submission on your phone (of course this assumes that your phone is capable of receiving email.) For instance, I have my phone setup to retrieve mail from a number of different mailboxes that I use for various purposes.

      Alternatively, you can simply add your phone's address using the format noted by wayfarer as a recipient of the message.

      Thanks,
      Derek
      {{ DiscussionBoard.errors[3177928].message }}
  • Profile picture of the author Sparksman
    Hi to all above with big thank you's to all of you for taking the time to offer up your suggestions!

    Sorry not been on here recently as been away, but I have now sorted it all out.
    Thanks again...
    Terry
    {{ DiscussionBoard.errors[3279703].message }}
    • Profile picture of the author jalicia18
      before you can use the sms php code, you need to have an sms gateway server. This gateway server is different to your web hosting server. Your script will support on SMS function via mobile phone but you're require to have an account and balance from the sms provider.
      {{ DiscussionBoard.errors[3284672].message }}
  • Profile picture of the author DEaFeYe
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[3463618].message }}

Trending Topics