Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP changes #9460

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions upload/system/library/mail/smtp.php
Expand Up @@ -37,25 +37,25 @@ public function send() {
if (!$this->html) {
$message = '--' . $boundary . PHP_EOL;
$message .= 'Content-Type: text/plain; charset="utf-8"' . PHP_EOL;
$message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;
$message .= $this->text . PHP_EOL;
$message .= 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL;
$message .= base64_encode($this->text) . PHP_EOL;
} else {
$message = '--' . $boundary . PHP_EOL;
$message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . PHP_EOL . PHP_EOL;
$message .= '--' . $boundary . '_alt' . PHP_EOL;
$message .= 'Content-Type: text/plain; charset="utf-8"' . PHP_EOL;
$message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;
$message .= 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL;

if ($this->text) {
$message .= $this->text . PHP_EOL;
$message .= base64_encode($this->text) . PHP_EOL;
} else {
$message .= 'This is a HTML email and your email client software does not support HTML email!' . PHP_EOL;
$message .= base64_encode('This is a HTML email and your email client software does not support HTML email!') . PHP_EOL;
}

$message .= '--' . $boundary . '_alt' . PHP_EOL;
$message .= 'Content-Type: text/html; charset="utf-8"' . PHP_EOL;
$message .= 'Content-Transfer-Encoding: 8bit' . PHP_EOL . PHP_EOL;
$message .= $this->html . PHP_EOL;
$message .= 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL;
$message .= base64_encode($this->html) . PHP_EOL;
$message .= '--' . $boundary . '_alt--' . PHP_EOL;
}

Expand Down