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

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

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

Gridview Not updating in Update Panel
I have a gridview, three dropdown list boxes, and a button on my form. What is displayed in the gri

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.

we have to suppl

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

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