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

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST metho

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

Transferring session variables into MySQL
I am trying to transfer $_SESSION variables into MySQL. However there is an error in my MySQL statem

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

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