PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 23rd, 2009, 06:13 PM
kartiktalwar kartiktalwar is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 40 kartiktalwar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 27 m 20 sec
Reputation Power: 2
SMS via PHP

I just found out that you can send sms by just emailing it to the phone number.

I created this script and it works.
PHP Code:
<?php


$sendersname 
"My Name";
$sendersemail "my@email.com";
$recipient "1234567@myprovider.com";
$message "Test Message";
$subject "Test subject";
$header "From: "$sendersname " <" $sendersemail ">\r\n";

mail($recipient$subject$message$header)
?>


Now I get the message on my phone but it has the text at top saying "myhost@host207.bluehost.com" and then it shows the message

when I tried emailing the same thing using my gmail account, it only showed my email address and the message.

How can I modify this script so it displays my email instead of the host email.

Thanks

Last edited by kartiktalwar : June 23rd, 2009 at 06:20 PM.

Reply With Quote
  #2  
Old June 24th, 2009, 01:47 AM
sliver's Avatar
sliver sliver is offline
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 932 sliver User rank is Private First Class (20 - 50 Reputation Level)sliver User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 11 h
Reputation Power: 3
Send a message via AIM to sliver Send a message via XFire to sliver
Try adding a reply-to header, along with your From header.

Reply With Quote
  #3  
Old June 24th, 2009, 06:18 PM
kartiktalwar kartiktalwar is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 40 kartiktalwar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 27 m 20 sec
Reputation Power: 2
No, adding a reply to header doesnt work

Reply With Quote
  #4  
Old June 29th, 2009, 11:56 AM
jamestrowbridge jamestrowbridge is offline
Contributing User
Click here for more information.
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 400 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 15 h 59 m 8 sec
Reputation Power: 2
I use this a lot, and I always just simply use:

PHP Code:
<?php 


$sendersname 
"My Name";
$sendersemail "my@email.com";
$recipient "1234567@myprovider.com";
$message "Test Message";
$subject "Test subject";
$header "From: ".$sendersemail."\r\n";

mail($recipient$subject$message$header
?>



For instance. Good luck getting an SMS message to show you the Sender's Name.
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge.

Reply With Quote
  #5  
Old June 29th, 2009, 01:58 PM
kartiktalwar kartiktalwar is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 40 kartiktalwar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 27 m 20 sec
Reputation Power: 2
No,
Its still the same. It still shows my host provider's email on the message but when I just send an email with gmail it shows my gmail email as the 1st line of the message

Reply With Quote
  #6  
Old June 29th, 2009, 02:11 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Click here for more information.
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 400 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 15 h 59 m 8 sec
Reputation Power: 2
It's probably an issue with the provider's mail server.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > SMS via PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT