473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

send sms using php script

Hi, any one help me

here i am attaching source code to send sms using php code it show the message "message sent successfully " but message is not delivered

code:

Expand|Select|Wrap|Line Numbers
  1. <?
  2. # 10 digit number .. can get it from a form using post method
  3.  
  4.  
  5. $from="91xxxxxxxxxxxx@ri.irisme.net";
  6.  
  7. # convert it to an email format
  8. $to="91xxxxxxxxx@ri.irisme.net";
  9. $subject="hi";
  10.  
  11. # message body .. can get it from a form using post method
  12. $body = @$_POST['message'];
  13. $header= "From:". $from."\r\n";
  14. $header.= "X-Mailer: PHP/". phpversion();
  15.  
  16. if (mail($to,$subject,$body,$header,"-f $from"))
  17. {
  18. echo "To: $to \n" . "<br>";
  19. echo "From: $from \n" . "<br>";
  20. echo "Message: $body \n";
  21. echo "message sent successfully.";
  22. }
  23. else
  24. {
  25. echo "Message delivery failed…\n";
  26. }
  27. ?>
please give me reply

Thanks in advance
Ramana
Mar 13 '09 #1
5 5785
Markus
6,050 Expert 4TB
If mail() is returning true, then I'd assume the email is being sent. That being said, I suspect it's the mail server 'ri.irisme.net' is not forwarding the sms.
Mar 13 '09 #2
Markus
6,050 Expert 4TB
In fact, browsing to ri.irisme.net gives me an error - page not found. So .. just a guess .. maybe that's why it's not working?
Mar 13 '09 #3
if i am avoid the "ri.irisme.net" is it working fine
tell me any modifications
Mar 13 '09 #4
Markus
6,050 Expert 4TB
@ramanagosu
Try sending the mail to a valid email address?
Mar 13 '09 #5
This script works fine but on the message recieved, the first line is host107.bluehost.com and then the message starts.

Is there a way to remove the host provider email as it could be a security threat ?
Aug 5 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
15
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
1
by: Miguel Dias Moura | last post by:
Hello, Can you help me out in making this work? What I want is as simple as sending form values to an email. The code I am using is the following:
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
5
by: Andreas | last post by:
I am working with three computers, my developing computer, a Web Server and a Mail Server (Exchange). I am trying to send a email from the Web Server via the Mail Server to a valid email address...
11
by: fdu.xiaojf | last post by:
Hi, I just want to send a very simple email from within python. I think the standard module of smtpd in python can do this, but I haven't found documents about how to use it after googleing....
1
by: vijayarl | last post by:
Hi All, I need to send a email based on the flag value, am using Email::Send module(CPAN). Requirement : 1.Based on the $email_flag, call the send_email function so, script goes like this: ##...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.