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";
Did you know?Explore Trending and Topic pages for more stories like this.

// 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

Problems with adding a link to one position in a 'foreach' loop, please help
Hello!

Iam pretty new to programming and I wanna create a table with users from an array. It

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

Dynamic memory problem
Hey,

At the beginning of my code, I have this line:

Shape* gShape = 0;

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

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