php unable to sent email


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

Hi, guys, I try to send a email through php but unfortunately the mail unable to sent. Here is my code, any configuration that I need to change in order to send the email ? Anyone who know please help ? Thanks in advance.

<?// send e-mail to ...
$to="me@localhost";

// Your subject
$subject="Test";

// From
$header="from: your name <your email>";

// Your message
$message="Hello rn";
$message.="This is testrn";
$message.="Test again ";

// send email
$sentmail = mail($to,$subject,$message,$header);

// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}
else {
echo "Cannot Send Email ";
}
?>

The error message "Cannot Send Email" shown

No comments posted yet

Your Answer:

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

Select all entries from database that include a phrase
I have a database of clubs - one of the categories is meeting time and place
I would like to have

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

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