send mail function not working properly

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kanga669
Forum Newbie
Posts: 2
Joined: Thu May 08, 2008 5:19 pm

send mail function not working properly

Post 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
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: send mail function not working properly

Post by Jade »

I would think that would work. Have you tried it?
kanga669
Forum Newbie
Posts: 2
Joined: Thu May 08, 2008 5:19 pm

Re: send mail function not working properly

Post 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
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: send mail function not working properly

Post 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.
Post Reply