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

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Obj

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos

MID(networkset.networkid, 3, 3) AS &q

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the prob

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't ma

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

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