Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, I'm having a little problem.
I have a form (in flash) which calls this code in a php-page:$subject = "My subject";
$contactname = "my name";
$contactemail = "my@email.adres";
$message = "my message";$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$realname." \r\n";
$headers .= "To: ".$contactname." \r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: my.domain";
mail($contactemail, $subject, $message, $headers);
When I use the form, everything works, but everything is on 1 line, which makes it hard to read.
Is there faulty code?
What am I doing wrong?
any help apreciated!I noticed that when I add an extra variable to the mail()-function, that I recieve the email, but from "Daemon user for apache" instead of the emailadres filled-in in the form. But the strange thing is that when I do that, that the text appears as I want it, including the linebreaks. But then there is an error in the emailheader, he then doesn't understand "MIME-Version 1.0"
any ideas?

You may have uploaded it in Auto mode, you have to upload all your scripts in ASCII mode, you can prefer this setting in your upload manager. The wrong sender name is because of your server, contact your hosting company for any details.

I uploaded it in ascii mode. The wrong sender name appears only if I add an extra option to the mail()-funtion. If I use the script that you see in the first post, the sender name is correct. So I guess that is caused by the fact that it doesn't understand the extra option in the mail function.
But why does it work (almost) if I use mail()wrongly and doesn't work correct when I use it as posted above?
(by the way, it's my own server, so I can change anything if that would appear to be necessary)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |