Skip to content

Commit

Permalink
Better checking for invalid 8bit data
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed May 27, 2014
1 parent c291d10 commit a55b82f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions framework/Smtp/lib/Horde/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ public function send($from, $to, $data, array $opts = array())

// RFC 6152[3]
if (!empty($opts['8bit'])) {
if (!$this->data_8bit) {
throw new InvalidArgumentException(
'Server does not support sending 8-bit data.'
);
}

$mailcmd .= ' BODY=8BITMIME';
} elseif ($this->_debug->active && $this->data_8bit) {
/* Only output extended 7bit command if debug is active (it is
Expand Down

0 comments on commit a55b82f

Please sign in to comment.