I'm having trouble with Swiftmailer when i send a message and sometimes i receive that the content is completely broken (HTML stripped).
My software sends a lot of emails, and this thing happens almost every day but we can't get any log of it, since we are using Yii as our primary framework and it doesn't show any error (we use the log trace tool and the body is always HTML without any errors).
The worst thing is that we changed some of the code in Swiftmailer to break line before the default strip_tags used on the msgHTML() method to improve the plain/text part. So the real problem is that the users are not viewing the plain part but the HTML stripped, causing a lot of trouble.
Just an observation, we are using a relay to send through smtp (port 25 and no authentication).
Changes on Swiftmailer:
public function MsgHTML($body) {
$this->body = $body;
if ($this->altBody == null) {
$this->altBody = str_replace('<br />', '<br />' . PHP_EOL, $this->body);
$this->altBody = str_replace('</p>', '</p>' . PHP_EOL, $this->altBody);
$this->altBody = strip_tags($this->altBody);
}
return $this;
}
HTML sent: Link