I'm trying to get a php mail script working, but it's nog going to good....
I looked around here for some sample code and foud a link to some site, don't remember wich, where I found some... I've changed it a bit, but it doesn't work... there were more "headers" first, but everyting in the header after "Content-type: text/html;" is printed out as text in the email... so in the email where the From: adress should be, theres the adress to the server, and at the top of the email theres the header text, including the "From:" thing...
so, what I want is the sender/reply adres to be in the right adress field and no additional text in the message...
I hope you understand my problem and I hope you know how to fix it...
here's the code:
- Code: Select all
<?php
$myname = "test";
$myemail = "someguy@myplace.se";
$subject = "testar lite bara";
$message = "<HTML><body>";
$message .= "Hi ,<br><br>";
$message .="Ticket requires <font color='#999999'>your feedback</font>. If
you could please contact us regarding the
status<br>";
$message .= "of your system it would be
appreciated.<br>Å
Ö<br>";
$message .= "<BR><BR><BR>Thank
You,<br>";
$message .= "</body></html>";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html;";
$headers .= "From: ".$myemail."\r\n";
$email = "someguy@myplace.se";
$var = mail($email, $subject, $message,
$headers);
if($var)
echo'det funkade';
else
echo'det funkade INTE';
?>


