Error web form

I'm testing my web form and when i want to send email it says:
There is no email program to associated to preform the requested action.
HELP HELP HELP :)
zmlakicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

William FulksSystems Analyst & WebmasterCommented:
If your form is pushing everything to a "mailto" command then it means you have no local email app set. Look into Control Panel - Internet Options - Programs tab - Set Programs. Are you using Outlook or something similiar? If you only use web-based email like Google Mail, the form won't work.
1
zmlakicAuthor Commented:
Yes mailto pushing everything. but i didnt fix the problem. So i switched to php sample i'm geek in that. Now working and i get mail but i dont know who sending mail.


$email_from = 'HERE IS PROBLEM';//<== update the email address
$email_subject = "New Form submission";
$email_body = "You have received a new message from the user $name.\n".
0
William FulksSystems Analyst & WebmasterCommented:
Right, because they are sending directly from your form instead of via a client. You'd have no way of reading or capturing their email address unless they provided it in the form, or you prefilled something in there just to say it's from a web form. Be careful with this kind of stuff because spammers like to hijack open mail relays and turn your system into a spambot. It'll get you blacklisted by Barracuda and other filtering sites.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

zmlakicAuthor Commented:
Why I need in form client email necessarily if  the client dont  enter his email is not able to send me question. Most forms is required email field.
0
William FulksSystems Analyst & WebmasterCommented:
I'm not really understanding what you're asking.
0
zmlakicAuthor Commented:
Here is code

<?php
if(!isset($_POST['submit']))
{

}
$name = $_POST['cd-name'];
$visitor_email = $_POST['cd-email'];
$message = $_POST['cd-textarea'];

//Validate first
if(empty($name)||empty($visitor_email))
{
    echo "Name and email are mandatory!";
    exit;
}

if(IsInjected($visitor_email))
{
    echo "Bad email value!";
    exit;
}

foreach ($_POST['furniture'] as $select)
{
echo "You have selected :" .$select; // Displaying Selected Value
}




$email_from = 'What here goes';//<== update the email address
$email_subject = "New Form submission";
$email_body = "You have received a new message from the user $name.\n".
    "Here is the message:\n $message".

$email_interested = "Client is interested for".
"            ".
      
$to = "mymail@example.com";//<== update the email address
$headers = "From: $email_from \r\n";
$headers .= "Reply-To: $visitor_email \r\n";
//Send the email!
mail($to,$email_subject,$email_body,$headers, $email_from,$email_interested);
header('Location: contact.html');


// Function to validate against any email injection attempts
function IsInjected($str)
{
  $injections = array('(\n+)',
              '(\r+)',
              '(\t+)',
              '(%0A+)',
              '(%0D+)',
              '(%08+)',
              '(%09+)'
              );
  $inject = join('|', $injections);
  $inject = "/$inject/i";
  if(preg_match($inject,$str))
    {
    return true;
  }
  else
    {
    return false;
  }
}
   
?>
0
William FulksSystems Analyst & WebmasterCommented:
You could set email_from = visitor_email and that would show the reply address as whatever they entered. Is that what you were wanting? Otherwise you could put anything in there. Some sites I've seen will use a dummy address that says DO NOT REPLY, like when you get acknowledgement that a message was sent but someone else will be contacting you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.