diff --git a/src/MDMailFormat.php b/src/MDMailFormat.php index e3c5c9c..21c70d6 100644 --- a/src/MDMailFormat.php +++ b/src/MDMailFormat.php @@ -16,6 +16,8 @@ final class MDMailFormat { const CSS_H2 = "margin: .3em 0 .5em 0; padding: 0 0 0 0; font-size: 1.1em; font-weight: bold;"; const CSS_P = "margin: 0 0 0 0; padding: .4em 0 .6em 0; font-style: normal;"; const CSS_FOOTER = "margin-top: .5em; padding-top: .5em; border-top: .1em solid #D6D6D6;"; + const CSS_UL = "margin: 1em 0; padding: 0 0 0 1em; list-style: square;"; + const CSS_OL = "margin: 1em 0; padding: 0 0 0 1em;"; const CSS_A_NORMAL = "text-decoration: none;"; const CSS_A_FOOTER = "text-decoration: none; font-size: .95em;"; const CSS_A_FOOTER_HOVER = "color: " . self::ACCENT_COLOR_SEC . " !important;"; @@ -42,6 +44,8 @@ final class MDMailFormat { */ public function appendHeadline(string $input):void { + $input = trim($input); + $this->_msg_html .= "

" . nl2br($input) . "

"; $this->_msg_plain .= "{$input} =================== @@ -58,6 +62,8 @@ final class MDMailFormat { */ public function appendHeadlineSec(string $input):void { + $input = trim($input); + $this->_msg_html .= "

" . nl2br($input) . "

"; $this->_msg_plain .= "{$input} ------------------- @@ -74,6 +80,8 @@ final class MDMailFormat { */ public function appendParagraph(string $input):void { + $input = trim($input); + $this->_msg_html .= "

" . nl2br($input) . "

"; $this->_msg_plain .= " {$input} @@ -91,6 +99,8 @@ final class MDMailFormat { */ public function appendButton(string $href, string $input):void { + $input = trim($input); + $this->_msg_html .= "" . nl2br($input) . ""; $this->_msg_plain .= " {$input}: {$href} @@ -108,6 +118,8 @@ final class MDMailFormat { */ public function appendLink(string $href, string $input):void { + $input = trim($input); + $this->_msg_html .= "" . nl2br($input) . ""; $this->_msg_plain .= "{$input}: {$href}"; @@ -119,7 +131,7 @@ final class MDMailFormat { * @return void */ public function startUl():void { - $this->_msg_html .= "