/    Sign up×
Community /Pin to ProfileBookmark

why m not getting mail

pls can anyone provide me mail script in php?/i want simple mailing with showing all the message name from contact form without database…i have script :
?php $name = $_POST[‘name’];
$email = $_
POST[’email’];
$phone = $_POST[‘phone’];
$message = $_
POST[‘message’];
$formcontent=”From: $name n Message: $message”;
$recipient = “[email protected]“;
$subject = “Contact Form”;
$mailheader = “From: $email rn”;
mail($recipient, $subject, $formcontent, $mailheader) or die(“Error!”);
echo “Thank You!”;
?>

this is not working in free host.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@sweetsamy35Sep 21.2015 — Are you saying you are trying this in your localhost? If yes then it wont work as you may not have smtp on your local server. You will need to install and enable smtp before you can send email.

Thanks

Sam
Copy linkTweet thisAlerts:
@ginerjmSep 21.2015 — Plus your php tag is faulty
Copy linkTweet thisAlerts:
@ginerjmSep 22.2015 — What happened to the other reply that was here before my first post? Something about OP not having smtp enabled on his localhost being the problem?
×

Success!

Help @Mikdadali spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...