ich habe eine E-mail Formular erstellt und versuche seit gestern raus zu finden wie ich den E-mail Inhalt mit HTML befehlen formatieren kann.
So sieht meine send.php aus
VORSICHT: ist ewas chinesisch dabei
- Code: Alles auswählen
<head>
<title>Job Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<?php
$receiver = "xxxx@xxx.xom"; // Geben Sie hier ihre E-Mail ein!
#
$name = $_POST['name'];
$subject = "Job Request";
$gender = $_POST['gender'];
$month = $_POST['month'];
$year = $_POST['year'];
$day = $_POST['day'];
$location = $_POST['location'];
$school = $_POST['schools'];
$education = $_POST['education'];
$workexp = $_POST['workexp'];
$selfintro = $_POST['selfintro'];
$contactinfo = $_POST['contactinfo'];
$headers = "Content-Type: text/html; charset=UTF-8";
#
$content = '
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<b>Job Request</b>
\n\n
<b>>姓名</b>: $name
\n
<b>性别</b>: $gender
\n
<b>出生日期</b>: $day-$month-$year
\n
<b>籍贯</b>: $location
\n
<b>毕业学校及专业</b>: $schools
\n
<b>学历</b>: $education
\n
<b>工作经历</b>: $workexp
\n
<b>自我介绍</b>: $selfintro
\n
<b>联系方式</b>: $contactinfo
</body>
</html>
';
if(mail($receiver, $subject, $header, $content))
{
?>
<body bgcolor="#CC6633" style="color: #000000; font-size: 12px, font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center;">
电子邮件出动成功!
</body>
<?php
}
else
{
?>
<body bgcolor="#CC6633" style="color: #000000; font-size: 12px, font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center;">
电子邮件不能发送. <br>
<a href="jobrequest.php" target="_self">回形式的接触. </a>
</body>
<?php
}
?>