In later Versions then 7.1.4, i have problem when sending MIME emails, they are received perfectly, and checking the local sent folder they appear perfectly, but when checking the sent folder of the external IMAP account they are empty or blank…
I think it is a problem of PhpMailler in:
public function getMailMIME()
{
…
case ‘alt’:
case ‘alt_inline’:
$result .= $this->headerLine(‘Content-Type’, ‘multipart/alternative;’);
$result .= $this->textLine("\tboundary="" . $this->boundary[1] . ‘"’);
break;
public function createBody()
{
…
case ‘alt’:
$body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, ‘text/plain’, $altBodyEncoding);
$body .= $this->encodeString($this->AltBody, $altBodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->getBoundary($this->boundary[1], $bodyCharSet, ‘text/html’, $bodyEncoding);
$body .= $this->encodeString($this->Body, $bodyEncoding);
$body .= $this->LE . $this->LE;
if (!empty($this->Ical)) {
$body .= $this->getBoundary($this->boundary[1], ‘’, ‘text/calendar; method=REQUEST’, ‘’);
$body .= $this->encodeString($this->Ical, $this->Encoding);
$body .= $this->LE . $this->LE;
}
$body .= $this->endBoundary($this->boundary[1]);
break;
case ‘alt_inline’:
$body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, ‘text/plain’, $altBodyEncoding);
$body .= $this->encodeString($this->AltBody, $altBodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->textLine(’–’ . $this->boundary[1]);
$body .= $this->headerLine(‘Content-Type’, ‘multipart/related;’);
$body .= $this->textLine("\tboundary="" . $this->boundary[2] . ‘"’);
$body .= $this->LE;
$body .= $this->getBoundary($this->boundary[2], $bodyCharSet, ‘text/html’, $bodyEncoding);
$body .= $this->encodeString($this->Body, $bodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->attachAll(‘inline’, $this->boundary[2]);
$body .= $this->LE;
$body .= $this->endBoundary($this->boundary[1]);
break;
…
The boundary used = $this->boundary[1]
but in code of sent email is diferent:
…
X-Mailer: PHPMailer 5.2.13 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary=“b1_752eda803624f08833f5761db60c2844”
This is a multi-part message in MIME format.
–b1_7b408c1fc77dfcde2962c4cce472300d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
MESSAGE
–b1_7b408c1fc77dfcde2962c4cce472300d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
=0A=0A11:42=0A=0A
–b1_7b408c1fc77dfcde2962c4cce472300d–
Conclusion : boundary=“b1_752eda803624f08833f5761db60c2844” different --b1_7b408c1fc77dfcde2962c4cce472300d