Hej.
Jeg har siddet og rodet med det her PHP mail i nogle dage, og jeg kan sgu ikke få det til at virke. Jeg vil gerne kunne sende en kopi af
http://www.patrickreck.dk/love/?navn=Patrick
i en email. Jeg har prøvet med følgende kode uden held:
<?php
$to = 'reckpatrick@gmail.com';
$subject = 'Website Change Reqest';
$message .= "<html>";
$message .= "<head>";
$message .= "<style type='text/css'>";
$message .= "@charset 'utf-8';";
$message .= "/* CSS Document */";
$message .= "@font-face {";
$message .= " font-family: Filxgirl;";
$message .= " src: url('http://www.patrickreck.dk/love/Filxgirl.TTF');";
$message .= "}";
$message .= "body {";
$message .= " background-image: url(http://www.patrickreck.dk/love/images/bg.png);";
$message .= " background-repeat: repeat-x;";
$message .= " background-color: #ff5151;";
$message .= " margin: 0px;";
$message .= " overflow: hidden;";
$message .= "}";
$message .= "a {";
$message .= " text-decoration: none;";
$message .= "}";
$message .= "a:hover {";
$message .= " text-decoration: underline;";
$message .= "}";
$message .= "#wrapper {";
$message .= " width: 100%;";
$message .= " height: 100%;";
$message .= "}";
$message .= "#top {";
$message .= " width: 100%;";
$message .= " height: 25px;";
$message .= " background-image: url(http://www.patrickreck.dk/love/images/bg_top.png);";
$message .= "}";
$message .= "#indhold {";
$message .= " width: 926px;";
$message .= " height: 594px;";
$message .= " margin-top: 10px;";
$message .= " background-image: url(http://www.patrickreck.dk/love/images/hjerte.png);";
$message .= "}";
$message .= "#navn {";
$message .= " margin-top: 170px;";
$message .= " margin-left: 20px;";
$message .= " font-family: Filxgirl;";
$message .= " font-size: 100pt;";
$message .= " color: #8a1b1b;";
$message .= "}";
$message .= "#input {";
$message .= " border-radius: 6px;";
$message .= " -moz-border-radius: 6px;";
$message .= " width: 400px;";
$message .= " height: 45px;";
$message .= " font-family: tahoma;";
$message .= " font-size: 20pt;";
$message .= " color: #691010;";
$message .= " text-align: center;";
$message .= " border: 1px solid #891919;";
$message .= " /* gradient */";
$message .= " background: #ffb6b6;";
$message .= " background: -moz-linear-gradient(top, #ff7f7f, #ff9696);";
$message .= " background: -webkit-gradient(linear, left top, left bottom, from(#ff7f7f), to(#ff9696));";
$message .= " filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#ff7f7f', EndColorStr='#ff9696', GradientType=0);";
$message .= "}";
$message .= "#submit {";
$message .= " border-radius: 4px;";
$message .= " -moz-border-radius: 4px;";
$message .= " width: 100px;";
$message .= " height: 30px;";
$message .= " margin-top: 8px;";
$message .= " font-family: verdana;";
$message .= " font-size: 12pt;";
$message .= " color: #691010;";
$message .= " text-align: center;";
$message .= " border: 1px solid #891919;";
$message .= " /* gradient */";
$message .= " background: #ffb6b6;";
$message .= " background: -moz-linear-gradient(top, #ff7f7f, #f64242);";
$message .= " background: -webkit-gradient(linear, left top, left bottom, from(#ff7f7f), to(#f64242));";
$message .= " filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#ff7f7f', EndColorStr='#f64242', GradientType=0);";
$message .= "}";
$message .= "</style>";
$message .= "<title>Love</title>";
$message .= "</head>";
$message .= "<body>";
$message .= "<div id='wrapper' align='center'>";
$message .= " <div id='top' align='right'><span style='font-size: 2px;'><br /></span>";
$message .= " <a href='?side=opret' style='color: #eac1c1; float:left; margin-left: 5px;'>opret link</a>";
$message .= " <a href='?side=email' style='color: #eac1c1; float:right; margin-right: 5px;'>e-mail</a> ";
$message .= " </div>";
$message .= " <div id='indhold' style='border: 2px solid transparent;'>";
$message .= " <div id='navn' style='border: 2px solid transparent; font-size:;'>";
$message .= "Patrick";
$message .= " </div>";
$message .= " </div>";
$message .= "</div>";
$message .= "</body>";
$message .= "</html>";
$headers = "From: " . strip_tags($_POST['req-email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\r\n";
$headers .= "CC: susan@example.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to, $subject, $message, $headers);
?>
Håber der er nogen der har lidt erfaring med det :-) Mvh. Patrick
Indlæg senest redigeret d. 22.02.2011 10:25 af Bruger #13119