1 Востаннє редагувалося Faraon (15.07.2020 12:55:13)

Тема: Не коректно відправляється лист на gmail

Привіт, я витягую з бази дані і відправляю на почту (гмаил), справа в тому що при отриманні листа я спостерігаю що в листі  з'їзджає таблиця, додається незрозуміло чому "!", нові "<td></td>"...
Пробував навіть так:
[code=PHP]
$subject = 'Напоминание об неотправленных запросах';
$message = "<table id='parts' style='width: 100%; margin-top: 25px;'><tr style='background-color: ;'><th>Бренд</th><th>Номер запчасти</th><th>Количество</th></tr>
    ";

    $message .= "<tr><td>1fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
    $message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";



$headers  = "Content-type: text/html; charset=utf-8";
mail('faraon@gmail.com', $subject, $message, $headers);
[/code]
всі (крім 1 строки)

"<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";

є одинакові, але коли ми отримаємо листа то побачимо інше... чому? скрін додаю.

Post's attachments

_.jpg 77.19 kb, 205 downloads since 2017-06-15 

2

Re: Не коректно відправляється лист на gmail

це походу щось gmail мутить, при отриманні листа id таблиці міняється на "m_-8899282967906862953parts"

3 Востаннє редагувалося koala (15.06.2017 16:37:26)

Re: Не коректно відправляється лист на gmail

Будь ласка, переглядайте не те, що вам браузер відмальовує, а джерело:
http://replace.org.ua/misc.php?action=pun_attachment&amp;item=1580

Post's attachments

show_original.PNG 12.39 kb, 216 downloads since 2017-06-15 

4 Востаннє редагувалося Faraon (15.06.2017 16:46:19)

Re: Не коректно відправляється лист на gmail

koala написав:

Будь ласка, переглядайте не те, що вам браузер відмальовує, а джерело:
http://replace.org.ua/misc.php?action=pun_attachment&amp;item=1580

а що я там маю побачити?

Прихований текст

Delivered-To: stadnyk.roman1@gmail.com
Received: by 10.28.198.78 with SMTP id w75csp800780wmf;
        Thu, 15 Jun 2017 07:22:27 -0700 (PDT)
X-Received: by 10.25.165.208 with SMTP id o199mr2046054lfe.115.1497536547666;
        Thu, 15 Jun 2017 07:22:27 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1497536547; cv=none;
        d=google.com; s=arc-20160816;
        b=S/KcwKBAe65qmYSFj8mtYn5qTxOEzd9FLLlODT6E5YHWQjU3F/PEEMf04gzCux5PUO
         U245fKrs9SwjGrRor1i55/xx+9jw0qVRE58xK8xhK/Da09XKAxR+72YQ0cRzyyGBcv9m
         naCLrgYbqn7LRSYwyWiPQrgg4VPhhhhma7+WtnzQCg+LKaV4566GOePHOCkWODe1rR0T
         mnuSA4Hy833clhSEGF6HTFhTzsXWK4r7RkhM0x3uG0zlCqdZfJKKh7x8CyxJEJEcTTnH
         wm8oL9g76rDXreDO/JhyJ1zTCleBxavsa3h2CKZ3iEzDai7GQgyPEcCTBNU/oXmO8rn+
         qUSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=subject:to:message-id:from:date:arc-authentication-results;
        bh=YbRypIBsjpzhizyNAsUv0DpCFAr8lwA1IN7da1lvuxo=;
        b=fKvdngHBqiFFQntGHVZ0XdS6EPQSKjeyQNIAfplEtXHalJ3s/24ZKSa0E7Wa2AG6kw
         7etxSjh9w6xyVym99gYkLlTLZ0QeiVeubTODB8bGX9ChAeQWDOgwDSTEYDua2EpsrWBb
         q2t39SRryjJVr58zkVVDzKpP0IoyiP0M3bWkTWrAOqRceaohFR8fYYwQDNkaUd6v4knn
         vacuekcX/FXc7pc80X2i/P7NH0TUjqbS4UCLSKkjw2g1igvdGyiUuObkyigX1haJEA16
         RQmFK5I7Tu/Ek9voFAMxld5Bl/0gIpzDK0JlO2o2ahQiICK3g3OHexrQ0AlQZ6ZopzVo
         vsJw==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 91.222.136.199 is neither permitted nor denied by best guess record for domain of smikrof@web129.default-host.net) smtp.mailfrom=smikrof@web129.default-host.net
Return-Path: <smikrof@web129.default-host.net>
Received: from mx25.ukraine.com.ua (mx25.ukraine.com.ua. [91.222.136.199])
        by mx.google.com with ESMTPS id a25si123456lfc.279.2017.06.15.07.22.27
        for <stadnyk.roman1@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 15 Jun 2017 07:22:27 -0700 (PDT)
Received-SPF: neutral (google.com: 91.222.136.199 is neither permitted nor denied by best guess record for domain of smikrof@web129.default-host.net) client-ip=91.222.136.199;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 91.222.136.199 is neither permitted nor denied by best guess record for domain of smikrof@web129.default-host.net) smtp.mailfrom=smikrof@web129.default-host.net
Received: from web129.default-host.net (web129.default-host.net [91.206.200.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx25.ukraine.com.ua (Postfix) with ESMTPS id CF26120169B for <stadnyk.roman1@gmail.com>; Thu, 15 Jun 2017 17:22:26 +0300 (EEST)
Received: from web129.default-host.net (localhost [127.0.0.1]) by web129.default-host.net (8.14.4/8.14.4) with ESMTP id v5FEMQxK694464 for <stadnyk.roman1@gmail.com>; Thu, 15 Jun 2017 17:22:26 +0300
Received: (from smikrof@localhost) by web129.default-host.net (8.14.4/8.14.4/Submit) id v5FEMQ9P694455; Thu, 15 Jun 2017 17:22:26 +0300
Date: Thu, 15 Jun 2017 17:22:26 +0300
From: yaroslav@mikro-f.com
Message-Id: <201706151422.v5FEMQ9P694455@web129.default-host.net>
To: stadnyk.roman1@gmail.com
Subject: Напоминание об неотправленных запросах
Content-type: text/html; charset=utf-8
X-Delta-Virus-Check: ok
X-Delta-Spam-Symbols: Symbols: MIME_HTML_ONLY(1.00), R_BAD_CTE_7BIT(3.00), ONCE_RECEIVED(1.00), MIME_HEADER_CTYPE_ONLY(2.00);
X-Delta-Spam-Score: 7

<table id='parts' style='width: 100%; margin-top: 25px;'><tr style='background-color: ;'><th>Бренд</th><th>Номер запчасти</th><th>Количество</th></tr>
                <tr><td>1fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t3!
4t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfgh!
gd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg44!
3</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retg!
ertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr><tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>

щодо id то воно так вірне, а ось самі колонки то вони і там не вірні. Питання чому??

5

Re: Не коректно відправляється лист на gmail

Для функції mail() вказано, що $message не повинно бути довшим 70 символів.
Можливо через це таке і твориться.

Там і вирішення є

$message = wordwrap($message, 70, "\r\n");
Подякували: Faraon, 221VOLT, ostap34PHP, leofun014

6 Востаннє редагувалося Faraon (15.06.2017 16:52:17)

Re: Не коректно відправляється лист на gmail

NagarD написав:

Для функції mail() вказано, що $message не повинно бути довшим 70 символів.
Можливо через це таке і твориться.

Там і вирішення є

$message = wordwrap($message, 70, "\r\n");

можливо (хоча ті символи додаються набагато дальше ніж від 70 позиції), ваше вирішення нічого не змінило(

7 Востаннє редагувалося NaharD (15.06.2017 19:27:00)

Re: Не коректно відправляється лист на gmail

Це залежить від якогось налаштування веб сервера.

Спробував так

$message = chunk_split($message, 902);

Результат вийшов

http://prntscr.com/fk5b93

розбиття відбулося по словах. В будь-якому випадку потрібна якась логіка аби не розбити якийсь тег.

Або такий варіант, якщо формуєте лист в циклі:

$message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>\r\n";

Або робити все без всяких конкатинацій.

        $subject = 'Напоминание об неотправленных запросах';
            $message = "<table id='parts' style='width: 100%; margin-top: 25px;'><tr style='background-color: ;'><th>Бренд</th><th>Номер запчасти</th><th>Количество</th></tr><tr><td>1fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
            $message .= "</table>";
            // $message = chunk_split($message, 902);
     
        $headers  = "Content-type: text/html; charset=utf-8"; 
        mail('nagard11@gmail.com', $subject, $message, $headers);

Тоді все автоматично розіб'ється i буде норм.

Подякували: 221VOLT, Faraon, ostap34PHP, leofun014

8

Re: Не коректно відправляється лист на gmail

NagarD написав:

Це залежить від якогось налаштування веб сервера.

Спробував так

$message = chunk_split($message, 902);

Результат вийшов

http://prntscr.com/fk5b93

розбиття відбулося по словах. В будь-якому випадку потрібна якась логіка аби не розбити якийсь тег.

Або такий варіант, якщо формуєте лист в циклі:

$message .= "<tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>\r\n";

Або робити все без всяких конкатинацій.

        $subject = 'Напоминание об неотправленных запросах';
            $message = "<table id='parts' style='width: 100%; margin-top: 25px;'><tr style='background-color: ;'><th>Бренд</th><th>Номер запчасти</th><th>Количество</th></tr><tr><td>1fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>
            <tr><td>fgdfg3fsdgdfg</td><td>retgertdfg443</td><td>fdgdfgfhfghgd43t3t34t</td></tr>";
            $message .= "</table>";
            // $message = chunk_split($message, 902);
     
        $headers  = "Content-type: text/html; charset=utf-8"; 
        mail('nagard11@gmail.com', $subject, $message, $headers);

Тоді все автоматично розіб'ється i буде норм.

так працює, дякую)