| @@ -178,9 +178,9 @@ | ||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | $this->sender = [ |
| 181 | 181 | 'address' => $address, |
| 182 | - 'name' => $name, | |
| 182 | + 'name' => $address != $name ? $name : null, | |
| 183 | 183 | ]; |
| 184 | 184 | |
| 185 | 185 | return $this; |
| 186 | 186 | } |
| @@ -191,9 +191,9 @@ | ||
| 191 | 191 | * @return string|null |
| 192 | 192 | */ |
| 193 | 193 | public function getSenderMail() |
| 194 | 194 | { |
| 195 | - return $this->sender && !empty($this->sender['address']) ? $this->sender['address'] : VBOFactory::getConfig()->get('senderemail'); | |
| 195 | + return !empty($this->sender['address']) ? $this->sender['address'] : VBOFactory::getConfig()->get('senderemail'); | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
| 199 | 199 | * Returns the sender name. |
| @@ -201,9 +201,9 @@ | ||
| 201 | 201 | * @return string|null |
| 202 | 202 | */ |
| 203 | 203 | public function getSenderName() |
| 204 | 204 | { |
| 205 | - return $this->sender ? $this->sender['name'] : null; | |
| 205 | + return !empty($this->sender['name']) ? $this->sender['name'] : VikBooking::getFrontTitle(); | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | 209 | * Sets the e-mail recipient(s). |
| @@ -444,9 +444,9 @@ | ||
| 444 | 444 | { |
| 445 | 445 | if (is_null($this->isHtml)) |
| 446 | 446 | { |
| 447 | 447 | // auto-detect whether the content supports HTML tags |
| 448 | - return preg_match("/<\/[a-z0-9_\-]+>/i", (string) $this->content); | |
| 448 | + return preg_match("/<\/?[a-z0-9_\-]+\s*\/?>/i", (string) $this->content); | |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | return $this->isHtml; |
| 452 | 452 | } |