fixed: sum query incorrect if using view as list base, and no distinct primary key selected
fixed: error if attaching pdf in email plugin, and emailing to two addresses