Здравствуйте. У меня есть проблема. Все работает и отправляет на почту, но в письме показывает только половину документа. Что делать? PHP: <?php $name = $_POST['name']; $visitor_email = $_POST['email']; $message = $_POST['message']; $name = htmlspecialchars($name); $email_from = 'contact@нескажу.info'; $email_body = "Ім'я клієнта: $name.\n". "Пошта: $visitor_email.\n". "Повідомлення: $message.\n"; $headers = "From: $email_from \r\n" ."Content-type: text/html; charset=utf-8\r\n" ."X-Mailer: PHP mail script"; mail( 'нескажу@gmail.com', "[клієнт-> $name <-]-$visitor_email-нескажу@photo.info", "<html><body><div class='profile-card-1' style='width: 300px;height: 490px;background: white;margin: 0 auto;border-radius: 10px;text-align: center;box-shadow: 4px 4px 10px #999;position: relative;box-sizing: border-box;overflow: hidden;'> <div class='img' style='height: 130px; width: 100%; background-image: linear-gradient(to right, #b79891, #94716b); padding: 20px; box-sizing: border-box; position: relative;'><img src='https://img.icons8.com/plasticine/2x/camera.png' style='width: 160px;height: 160px;padding: 3px;border-radius: 20%;border: 3px solid rgba(26, 26, 26, 1);position: absolute;left: calc(50% - 84px);top: 26px;' /></div> <a class='view-more' href='' style='position: absolute;top: calc(50% - .5em);left: calc(50% - .5em);z-index: 2;color: #2ECC71;font-size: 2em;'> <div class='popup' style='height: 500px;width: 500px;display: block;position: absolute;top: 0;left: 0;'></div> </a> <div style='position: absolute;height: 200px;width: 100%;top: 200px;left: 0;padding: 10px 20px 0;box-sizing: border-box;background: white;'> <div style='color: #333333;font-size: 1.4em;padding-top: 5px;background: rgba(255, 255, 255, 0.1);font-weight: bold;'>$name</div> <div style='color: coral;font-size: 1em;padding-bottom: 5px; font-weight: 900'>Founder and Owner at</div> <div style='background: #7ee2a8;width: 80%;height: 2px;margin: 5px auto -3px;'></div> <div style='display: flex;position: absolute;left: 10%;padding-top: 10px;width: 80%;justify-content: space-around;'> <div style='font-size: 1.1em;color: #333333;padding: 5px;font-weight: bold; text-align: center'>Some text <div style='color: gray;font-size: 0.6em;font-weight: normal;'>text message</div> </div> </div> </div> </div> </body></html>", "From: $email_from\r\n" ."Content-type: text/html; charset=utf-8\r\n" ."X-Mailer: PHP mail script" ) // header("Location: index.html"); ?>
Вангую проблема в стилях. Точно не в почте. --- Добавлено --- Поэтому переношу тему из "Работа с почтой" в "HTML и CSS" --- Добавлено --- @Andriy_co сохрани полученное письмо как файл *.eml и загляни в него. Там весь нужный HTML содержится или чего-то не хватает? Затем скопируй этот файл и переименуй в *.html. Удали из него всё лишнее до <html> и после </html>. Открой в браузере — нормально будет отображаться? --- Добавлено --- Полезные ссылки: https://www.google.com/search?q=особенности+html+в+почте