Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Saboi

9 posts

Wannabe Geek


#13260 1-May-2007 05:25
Send private message

Hi,

I have tried to use the code below to sent an SMS from my website using Clickatell but i am noit getting them.Where do you think am going wrong? Please advice.

<?php

$cell=$_POST["number"];

$message="api_id:xxxxxx\r
user:xxxxxx\r
password:xxxxx\r
to:$cell\r
reply:email@domain\r
text:SMS from Website";

if(mail($to="sms@messaging.clickatell.com",$subject,$message)){echo"Messgae Sent";}

else{echo"Message not sent";}

?>


Create new topic
Affiliate link
 
 
 

Affiliate link: Buy anything now at AliExpress.
freitasm
BDFL - Memuneh
73982 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#69009 1-May-2007 07:49
Send private message

Welcome to Geekzone... First make sure your script is actually sending out an e-mail by sending it to yourself. If you don't receive the e-mail then obvious things to look at are smtp server configuration, credentials, etc.

Then make sure you are using the number in the international format, without the + signal and of course without the 0. For a New Zealand number this would be 64 21 [number] (not 64 021 [number]).





Are you happy with Geekzone? Consider subscribing or making a donation.

 

 

 

freitasm on Keybase | My technology disclosure 

 

These links are referral codes: Sharesies | Mighty Ape | Norton 360 | Lenovo laptops | GoodsyncGeekzone Blockchain Project


NokiaRocks
362 posts

Ultimate Geek

Trusted

  #69010 1-May-2007 07:52
Send private message

Saboi: Hi,

I have tried to use the code below to sent an SMS from my website using Clickatell but i am noit getting them.Where do you think am going wrong? Please advice.


$cell=$_POST["number"];

$message="api_id:xxxxxx\r
user:xxxxxx\r
password:xxxxx\r
to:$cell\r
reply:email@domain\r
text:SMS from Website";

if(mail($to="sms@messaging.clickatell.com",$subject,$message)){echo"Messgae Sent";}

else{echo"Message not sent";}

?>



You cant put your mail command inside an "if statement" requirement.


Saboi

9 posts

Wannabe Geek


  #69170 2-May-2007 05:15
Send private message

Hello,

Thanks for the replies.

I am actually trying to send the SMS to my self and the international format of numbeering is what i am using.

Am told the mail command cant be in an if requirement.Any idea what i should do especially to also get on-screen confirmation of SMS sent.

Thanks people, i am already enjoying my stay at this forum.

So, whats my way forward?

Saboi



NokiaRocks
362 posts

Ultimate Geek

Trusted

  #69177 2-May-2007 07:58
Send private message

$cell=$_POST["number"];
$subject = "A new sms";
$message="api_id:xxxxxx\r
user:xxxxxx\r
password:xxxxx\r
to:$cell\r
reply:email@domain\r
text:SMS from Website";
mail('sms@messaging.clickatell.com', $subject, $message);
echo"Messgae Sent";
?>

Try sending one to yourself using this and see if you get a message.

freitasm
BDFL - Memuneh
73982 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#69182 2-May-2007 08:25
Send private message

Better still, also try sending to a normal email address to be sure the message is leaving your server.

There's no way to debug something like this before confirming that your server is actually sending something out - so make it a non-conditional action (as NokiaRocks suggests) and also try sending to a normal email address.

Once you know it's leaving the server then you can worry about other things.





Are you happy with Geekzone? Consider subscribing or making a donation.

 

 

 

freitasm on Keybase | My technology disclosure 

 

These links are referral codes: Sharesies | Mighty Ape | Norton 360 | Lenovo laptops | GoodsyncGeekzone Blockchain Project


Saboi

9 posts

Wannabe Geek


  #69347 3-May-2007 05:34
Send private message

Hi,

Tried the code but still no SMS on phone.Yes, i have credit and in my Clickatell account it shows 1 message undelivered.Email am getting an identifier number.

Where could i be going wrong?

Thanks.

Saboi

freitasm
BDFL - Memuneh
73982 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#69350 3-May-2007 08:00
Send private message

Thanks for the update - now we know the email is going out then since there's a failed SMS in your queue.

I can think of two problems:

In your configuration it is possible to select the routes you want to use. For example SMS to some countries cost more than to other countries and if the route is not select the SMS will not be sent. Some SMS require .5 credit others require 1, 1.5 or 2 credits. Check that you allow those to be sent.

Another thing I can think is that the number you are entering is invalid.

Since this is now sitting on the Clickatell platform I recommend you contact them with the message ID and ask why it wasn't sent. They will tell you the exact reason.





Are you happy with Geekzone? Consider subscribing or making a donation.

 

 

 

freitasm on Keybase | My technology disclosure 

 

These links are referral codes: Sharesies | Mighty Ape | Norton 360 | Lenovo laptops | GoodsyncGeekzone Blockchain Project




NokiaRocks
362 posts

Ultimate Geek

Trusted

  #69351 3-May-2007 08:00
Send private message

change the clickatell email address to your own email address to see if your server is actually sending emails.

Saboi

9 posts

Wannabe Geek


  #69438 3-May-2007 19:55
Send private message

Hello today,

My server is ending emails out and also to the clickatell server cause in my account it is actually showing that message was sent but undelivered.Report indicates status is Routing Error.

I am using the right format as was adviced.

As for credit, i have enough of it.

Anymore ideas on the way forward?

I have contacted clickatell and also sent them some message ids and look forward to hearing from them soon.I will let you know their response.

Meanwhile,anything else you advice i consider?

Thanks.

Saboi



NokiaRocks
362 posts

Ultimate Geek

Trusted

  #69459 3-May-2007 21:54
Send private message

Sorry, but if your message is getting to clickatell then i'm out of suggestions to fix it.

freitasm
BDFL - Memuneh
73982 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#69464 3-May-2007 22:30
Send private message

Saboi: As for credit, i have enough of it.


If there's a routing error it is related to credits. You may have enough, but if you don't allow messages to some "Profiles" the SMS is not sent.

For example, according to Clickatell, a SMS to Zambia costs 1.5 credits. If your profile does not have 1.5 credit destination checked the SMS will never be sent.


You find this in the Routing Profiles page, in the My Settings section.

Again, if this is not the case, contact Clickatell Support and tell them the MSG ID and they will be able to tell you why the Routing Error.





Are you happy with Geekzone? Consider subscribing or making a donation.

 

 

 

freitasm on Keybase | My technology disclosure 

 

These links are referral codes: Sharesies | Mighty Ape | Norton 360 | Lenovo laptops | GoodsyncGeekzone Blockchain Project


Saboi

9 posts

Wannabe Geek


  #69481 4-May-2007 05:04
Send private message

Hi,

This is very interesting.

The Routing Profilse are all checked.

I have sinced contacted Clickatell with the Message IDs for some of the messages.

Thanks.Will keep you posted on this one.

Saboi

Saboi

9 posts

Wannabe Geek


  #69482 4-May-2007 05:32
Send private message

Hi,

Managed.You where right, problem was number format.Left out ZERO.

Thanks.

Saboi

freitasm
BDFL - Memuneh
73982 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#69488 4-May-2007 08:05
Send private message

Great to know it's working now!





Are you happy with Geekzone? Consider subscribing or making a donation.

 

 

 

freitasm on Keybase | My technology disclosure 

 

These links are referral codes: Sharesies | Mighty Ape | Norton 360 | Lenovo laptops | GoodsyncGeekzone Blockchain Project


Create new topic





News and reviews »

D-Link G415 4G Smart Router Review
Posted 27-Jun-2022 17:24


New Zealand Video Game Sales Reaches $540 Million
Posted 26-Jun-2022 14:49


Github Copilot Generally Available to All Developers
Posted 26-Jun-2022 14:37


Logitech G Introduces the New Astro A10 Headset
Posted 26-Jun-2022 14:20


Fitbit introduces Sleep Profiles
Posted 26-Jun-2022 14:11


Synology Introduces FlashStation FS3410
Posted 26-Jun-2022 14:04


Intel Arc A380 Graphics First Available in China
Posted 15-Jun-2022 17:08


JBL Introduces PartyBox Encore Essential Speaker
Posted 15-Jun-2022 17:05


New TVNZ+ streaming brand launches
Posted 13-Jun-2022 08:35


Chromecast With Google TV Review
Posted 10-Jun-2022 17:10


Xbox Gaming on Your Samsung Smart TV No Console Required
Posted 10-Jun-2022 00:01


Xbox Cloud Gaming Now Available in New Zealand
Posted 10-Jun-2022 00:01


HP Envy Inspire 7900e Review
Posted 9-Jun-2022 20:31


Philips Hue Starter Kit Review
Posted 4-Jun-2022 11:10


Sony Expands Its Wireless Speaker X-series Range
Posted 4-Jun-2022 10:25









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.