edit: premature posting. I did not resolve the issue as I thought.
Anyway, I have a website hosted on Yahoo! and it appears that my PHP scripting is not supported on their end. Yahoo requires a 'from' section in the php script that is a e-mail address in your domain. I have a send_mail.php file that came with a template that I purchased. The developement company hosted it temporarily on their web server and it works perfect. When I upload the site to yahoo, the php contact page will not work.
Here is the send_mail.php script. Note - I changed my domain from the real domain to to mydomain.
<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "help@Mydomain.net";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nMydomain Email System";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
if( mail( $receiver, "Mydomain Support Form - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>
PHP send_mail help needed
Moderator: General Moderators
Re: PHP send_mail help needed
Have you checked .htaccess files that came with the script?.As a security routine,yahoo creates .htaccess on demand.Talk with your web host,he will help you out.If he dont,get a swift mailer class and rewrite the send email functions to you liking.
Re: PHP send_mail help needed
TurboMatt wrote:edit: premature posting. I did not resolve the issue as I thought.
Anyway, I have a website hosted on Yahoo! and it appears that my PHP scripting is not supported on their end. Yahoo requires a 'from' section in the php script that is a e-mail address in your domain. I have a send_mail.php file that came with a template that I purchased. The developement company hosted it temporarily on their web server and it works perfect. When I upload the site to yahoo, the php contact page will not work.
Here is the send_mail.php script. Note - I changed my domain from the real domain to to mydomain.
<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "help@Mydomain.net";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nMydomain Email System";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
if( mail( $receiver, "Mydomain Support Form - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>
What does it tell you when you try and send the mail?