Fix check for plain text attachments
* src/mail.cpp (Mail::checkAttachments_o): Use count_visible_attachments. (Mail::close): Fix safeguard check. * src/oomhelp.cpp (count_visible_attachments): New. * src/oomhelp.h: Add prototype.
The change in 0d2db8b81ab24e2ab02d7ba6832cabd07b72f852
introduced a big problem in the check for Mail::close
which then allowed writes to pass that should have
been prevented. This resulted in plaintext being written.