Page 1 of 1

send mail function not working properly

Posted: Thu May 08, 2008 5:24 pm
by kanga669
Hi guys

I finally finished my flash website. Unfortunately, my knowledge of php is a little outdated
While my contact form works flawlessly, I do have a LITTLE problem
whenever I try to retrieve my emails via Outlook, it always states that the mail is coming from
anynymous@linuxplesk...so basically the server
I want it to say that its coming from Flash Web Design
here is the code:

Code: Select all

<?php
    $mailfrom = "Flash Web Design";
    $to = "info@flashwebdesign.co.nz";
    $u_name = $_POST['name'];
    $u_mail = $_POST['email'];
    $subject = $_POST['subject'];
    $u_message = $_POST['message'];
    $msg = "Sender: $u_name\nE-Mail: \nMessage: $u_message";
 
    $headers = "From:Flash Web Design Contact Form Submission: <info@flashwebdesign.co.nz>\n";
    $headers = "Reply-To:$u_mail\n";
    $mail_status = mail($to,$subject,$msg,$headers);
    if($mail_status){
        echo "returnVal=success";
    }
    else{
        echo "returnVal=error";
    }
 
 
?>
Do you guys have any ideas?
the site is http://www.flashwebdesign.co.nz

Re: send mail function not working properly

Posted: Thu May 08, 2008 5:39 pm
by Jade
I would think that would work. Have you tried it?

Re: send mail function not working properly

Posted: Thu May 08, 2008 5:55 pm
by kanga669
yeah i did lol
it works to the extend that it sends off the mail, and i do receive it
and when i hit the reply button, it even puts in the authors email
it just doesnt display properly in outlook

Re: send mail function not working properly

Posted: Sun May 11, 2008 5:45 pm
by Jade
Most of the time outlook is setup to display HTML and not just plain text. Have you thought about including an HTML version of the email as well? Then you could guarantee the formatting as long as it looked okay in IE and Firefox.