diff --git a/src/Email.php b/src/Email.php index 6f9e068..74b246c 100644 --- a/src/Email.php +++ b/src/Email.php @@ -293,6 +293,7 @@ public function getLogs() */ public function send() { + $message = null; $this->socket = fsockopen( $this->getServer(), $this->port, @@ -346,7 +347,7 @@ public function send() if (!empty($this->attachments)) { $this->headers['Content-Type'] = 'multipart/mixed; boundary="mixed-' . $boundary . '"'; - $message = '--mixed-' . $boundary . self::CRLF; + $message .= '--mixed-' . $boundary . self::CRLF; $message .= 'Content-Type: multipart/alternative; boundary="alt-' . $boundary . '"' . self::CRLF . self::CRLF; } else { $this->headers['Content-Type'] = 'multipart/alternative; boundary="alt-' . $boundary . '"';