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

Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?

Code: &a

Array disappearing in foreach loop
Okay, I have this problem where an array will become undefined in a foreach loop.

Here is the

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

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

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

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