Hello friends i'm new in php programming,
i'm using wampserver with php5.3.5 , but it shows error on this code

$to = "bkstha2010@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonels@example.com";
echo "Mail Sent.";

as well as while executing html combined code.
Can someone help me?

If you are testing this page in local then it won't work.
You need smtp setting for sending email.
For other error post the error you are getting.

Member Avatar

If you've got something like mercury mail, turn it on. As mnentioned you need a smtp server.

Hi bishaw,

As mentioned above, you either need an SMTP server (like Mercury) enabled, or you can try using PEAR (See my comment on this post)

I think your SMTP server is not configured.....configure it then only you can send mail...