private function maybeAttachAddress(&$email) { $htmlAddress = $this->getHtmlAddress(); if (strstr($email['htmlbody'], $this->canSpamShortCode)) { $email['htmlbody'] = str_replace($this->canSpamShortCode, $htmlAddress, $email['htmlbody']); } else { $email['htmlbody'] .= $htmlAddress; } $textAddress = JavelinConfig::senderAddress(); if (strstr($email['textbody'], $this->canSpamShortCode)) { $email['textbody'] = str_replace($this->canSpamShortCode, $textAddress, $email['textbody']); } else { $email['textbody'] .= "\r\n" . $textAddress; } }
/** * @param $email * @return string */ private function getExpectedTextBody($email) { return sprintf("%s\r\n%s\r\nClick here to unsubscribe:\r\n%s", $email['textbody'], JavelinConfig::senderAddress(), $this->subscriber->getUnsubscriptionUrl()); }