Forum Moderators: coopster
$to = 'me@example.com ' . ', meagain@example.com';
$subject = 'Quote';
$message = '
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testing it all Out</title>
</head>
<body><p>This is a test</p>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
session_destroy();
header("Location: http://www.example.com");
exit;
}
[edited by: jatar_k at 4:29 pm (utc) on July 7, 2005]
[edit reason] examplified [/edit]
For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.
How could I find the PATH on my network even and could that be the issue?