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

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

xml
<?php

echo "<h1>XML Articles</h1>";

$home

How to copy a part of a vector in a raw memory
Hi,

How can I copy a part of a vector into a memory:

1
2
3
4
5

Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....

Warning: session_start() [fu

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

ereg_replace issue
hi there people

i have this code happening with regards to my wamp server. is this something

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

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