Prevent PHP mail( ) from appending hostname to from address


Posted on 16th Feb 2014 07:03 pm by admin

Hey guys,

I want to be able to send texts to phones via email (since each phone has their own address), and for specifying the from, I want to specify my own number, is there a way to do this?

Did you know?Explore Trending and Topic pages for more stories like this.
For example:

Code: $from = '7785555555';
if(mail($to, $subject, $message, "From: $from"))
echo "Mail sent";
If I do this, the From in the email will be 7785555555@hostname.com. Is there any way I can send it so that it doesn't auto append the host name?

Thanks
No comments posted yet

Your Answer:

Login to answer
194 Like 14 Dislike
Previous forums Next forums
Other forums

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Escaped characters
I have a script that allows you to post news to the home page of my site. Along with the news is the

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash