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
freitasm
BDFL - Memuneh
74159 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]).





Support Geekzone by subscribing, making a donation. or using one of our referral links: Sharesies | Goodsync  | Mighty Ape | Backblaze | Norton 360 | Lenovo laptops 

 

freitasm on Keybase | My technology disclosure

 

 

 

 

 

 


Affiliate link
 
 
 

Affiliate link: Life360 protects each family member with advanced driving, digital, and location safety features. Choose the plan that fits your family’s size and life stage.
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
74159 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.





Support Geekzone by subscribing, making a donation. or using one of our referral links: Sharesies | Goodsync  | Mighty Ape | Backblaze | Norton 360 | Lenovo laptops 

 

freitasm on Keybase | My technology disclosure

 

 

 

 

 

 


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
74159 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.





Support Geekzone by subscribing, making a donation. or using one of our referral links: Sharesies | Goodsync  | Mighty Ape | Backblaze | Norton 360 | Lenovo laptops 

 

freitasm on Keybase | My technology disclosure

 

 

 

 

 

 




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
74159 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.





Support Geekzone by subscribing, making a donation. or using one of our referral links: Sharesies | Goodsync  | Mighty Ape | Backblaze | Norton 360 | Lenovo laptops 

 

freitasm on Keybase | My technology disclosure

 

 

 

 

 

 


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
74159 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!





Support Geekzone by subscribing, making a donation. or using one of our referral links: Sharesies | Goodsync  | Mighty Ape | Backblaze | Norton 360 | Lenovo laptops 

 

freitasm on Keybase | My technology disclosure

 

 

 

 

 

 


Create new topic





News and reviews »

Samsung Introducing Galaxy Z Flip4 and Galaxy Z Fold4
Posted 11-Aug-2022 01:00


Samsung Unveils Health Innovations with Galaxy Watch5 and Galaxy Watch5 Pro
Posted 11-Aug-2022 01:00


Google Bringing First Cloud Region to Aotearoa New Zealand
Posted 10-Aug-2022 08:51


ANZ To Move to FIS Modern Banking Platform
Posted 10-Aug-2022 08:28


GoPro Hero10 Black Review
Posted 8-Aug-2022 17:41


Amazon to Acquire iRobot
Posted 6-Aug-2022 11:41


Samsung x LIFE Picture Collection Brings Iconic Moments in History to The Frame
Posted 4-Aug-2022 17:04


Norton Consumer Cyber Safety Pulse Report: Phishing for New Bait on Social Media
Posted 4-Aug-2022 16:50


Microsoft Announces New Solutions for Threat Intelligence and Attack Surface Management
Posted 3-Aug-2022 21:54


Seagate Addresses Hyperscale Workloads with Enterprise-Class Nytro SSDs
Posted 3-Aug-2022 21:50


Visa Launching Eco-friendly Payment Solutions in New Zealand
Posted 3-Aug-2022 21:48


NCR Delivers Services to Run Bank of New Zealand ATM Network
Posted 30-Jul-2022 11:06


New HP Portfolio Supports New Era of Hybrid Work
Posted 28-Jul-2022 17:14


Harman Kardon Launches Citation MultiBeam 1100 Soundbar
Posted 28-Jul-2022 17:10


Nanogirl Labs Launches Creator Project
Posted 28-Jul-2022 17:05









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.







Backblaze unlimited backup