I am trying to compile mail.php so that it sends the image attached to the HTML letter (not attached, but attached) with a link to the page of the site. Something like an E-card should work out, sending photo postcards through the form. Now I stopped at this ... if anyone has any ideas, write.
<?php $post = (!empty($_POST)) ? true : false; if($post) { $photo = $_POST['photo']; /// ссылка на изображение $url = $_POST['url']; /// ссылка на страницу $address = $_POST['address']; $message = $_POST['message']; $error = ''; if(!$address) {$error .= 'Укажите электронную почту. ';} if(!$message || strlen($message) < 1) {$error .= 'Введите сообщение. ';} if(!$error) { $email = $_POST['email']; $email = "email@Photo-card.com"; $sub = "Theme photo-card"; $mes = "Тема: " .$sub."\n\nСообщение: ".$message."\n\n"; $send = mail ($address,$sub,$mes,"Content-type:text/plain; charset = UTF-8\r\nFrom:$email"); if($send) {echo 'OK';} } else {echo '<div class="err">'.$error.'</div>';} } ?>
headerin particular theContent-typeand how to send an email in html format. - Naumov