P
P
Pavel2019-02-04 09:13:17
gmail
Pavel, 2019-02-04 09:13:17

What are the glitches in a letter to gmail?

iUrotAF.png
I make a plate on js, it is generated and completely the same, all classes in the html itself through style, although there are no classes there, I almost
send it via php to soap:

<?php

$recepient = "мое мыло@gmail.com";


$subject = "заголовок письма";

$data = $_POST["data"];

$prev = "<html><body>";
$end = "</html></body>";

$message = $prev .$data . $end;
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= "Content-type: text/html; charset=utf-8 \r\n";

// дополнительные данные
//$headers .= "From: Павел <от@gmail.com>\r\n"; // от кого
//$headers .= 'Cc: копия@ya.ru' . "\r\n"; // копия сообщения на этот адрес
//$headers .= "Bcc: скрытая@копия.ru\r\n"; // скрытая копия сообщения на этот

mail($recepient, $subject, $message, $headers);

maybe I did something wrong here? I kind of indicated the encoding, but on the screen you can still see that a glitch slipped through, and I send several letters in a row and a glitch with encoding and displaying the table is always there and always in different places

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2019-03-13
@mrusklon

it turned out that gmail does not understand long lines correctly, so there was such a tricky bug. I cut the lines and everything began to work fine

A
Alexander, 2019-02-04
@tomclancys

Little information...
Show the html that is being generated.
Show the letter yourself.
I think it's a layout error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question