Offline SMS to Email | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through February 09, 2012 ⬆ |
◄ ► |
Author | Message | |||
Zahoor Ahmed New member Username: Zahoor Post Number: 11 Registered: 04-2011 |
Dear Sir I live in Pakistan and still we face problem, I use 2 way command to send SMS to Email but sometime when there is no net connectivity SMS are lost. Is there any solution? Will local php script will solve problem? | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3667 Registered: 08-2008 |
If you are using a mailto: link in the 2-way command, NowSMS queues the e-mail message and retries when SMTP connectivity becomes available. However, I assume that you're using a variation of the PHP script that we previously discussed here: http://support.nowsms.com/discus/messages/1/70113.html If your PHP script returns an HTTP error code, by default NowSMS will retry up to 20 times with a delay between retries. To return an HTTP error code from a PHP script, use the following command: header("HTTP/1.1 500 Internal Server Error"); Be sure to use this command before issuing any echo commands. For example, in the script that I provided previously, you could insert the following to trigger a retry on an e-mail failure: if (PEAR::isError($mail)) { header("HTTP/1.1 500 Internal Server Error"); echo("ERROR: " . $mail->getMessage()); } else { echo("Message successfully sent!"); } To adjust the number of retries, edit SMSGW.INI, and create a [2Way] section similar to the following: [2Way] RetryMaxAttempts=#### -- Des NowSMS Support |