我想要一个用户可以上传图像的表格。该图像应作为附件显示在邮件上。
这是一些参考代码。
<?php
$name= $_POST['name'];
$photo= $_POST['photo'];
$mailTo = "test@hotmail.com";
$headers = "New mail\nMIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n";
$message = "<html><head>
<title>Title</title>
</head>
<body>
Name: $name <br>
Photo: $apellido
<img src=\"http://www.myserver.com/images_folder/my_image.jpg\">
</body>"
mail($mailTo, 'New mail', $message, $headers);
?>