2-way: SMS reply & email routing for each SMS | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through January 23, 2007 ⬆ |
◄ ► |
Author | Message | |||
Peter Jensen New member Username: Le_fez Post Number: 1 Registered: 09-2006 |
Hi there. Just started testing this app and are having some problems figuring out if NowSMS can di thsi for me: For each incoming SMS i want a script to run (ECHO script, sending an SMS to the sender) That's easy. but i ALSO want the incoming SMS to be routed to a users mailbox. (I have created an SMS user - works like a charm, but the 2-way command is not executed until i remove the routing option) I can't seem to get nowSMS to do both. Any hints? | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 6583 Registered: 10-2002 |
Hi Peter, We do not have an option which performs both actions. The only idea that I could think of would be to have your 2-way script also submit the message back to NowSMS by having it issue an HTTP request back to NowSMS. There is an undocumented parameter that can be included in the HTTP request "&LocalUser=" which can specify that the message should be routed to a local user mailbox instead of routed outbound via SMS. It sounds like you're working through a command line script, in which case there is an example of how to submit a new SMS from a command line interface here: http://www.nowsms.com/support/bulletins/tb-nowsms-008.htm If you're working in ASP or PHP, it's a similar concept, you would need to issue an HTTP GET back to NowSMS to (re)submit the message in question so that after the 2-way command is processed, the message then gets routed to the user mailbox. -bn | |||
Peter Jensen New member Username: Le_fez Post Number: 2 Registered: 09-2006 |
OK, I'll stop looking then I got it working with a PHP with a header ("location") function and a standard mail() function. In that way i can send an SMS reply to the sender and an email through my exchange server (that is actually what i REALLY wanted) If anyone is interested, here's the code: <? header ("Location: http://webserver:port/?phonenumber=" . $_REQUEST['sender'] . "&text=" . urlencode("reply text")); $txt = $_REQUEST['text']; $sender = $_REQUEST['sender']; $date = date('d-m-Y - H:i'); mail("recipient@domain.com","Subject"," The following has been received from $sender reply 'OK' sent on $date $txt *** END ***"); ?> | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 6592 Registered: 10-2002 |
Peter, Using the standard "mail()" function was an excellent idea! I hadn't even thought of that ... my suggestion was far more complicated. -bn | |||
Jorge Go New member Username: Ace888net Post Number: 3 Registered: 11-2006 |
Good day Mr. Jensen, Sir I am Jorge Go, I am rather new in with the software and php scripting.. I have some questions about php scripting and the program, if it is s not to much of a trouble could you email me at ace888net@yahoo.com, I have some questions that may need you expertise. Thanks in advance hope to hear form you. |