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

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

webpage with (simple) login & mysql-db
Hi all,

What I was looking for before was a multi-user password manager, web-based! The offer

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