Improve the --skip-empty-attachment functionality
This also includes small bugfixes in the MIME library code. The --skip-empty-attachment option now affects the original body as well. If the option is in effect, and the body is empty, it will not be included to the composed message. * libmailutils/mime/mime.c (_mime_body_stream_read): Return EOF if there are no parts in the message. (mu_mime_get_num_parts): If message is not multipart, report 1 part without setting mime->nmtp_parts. Setting it caused coredump in other MIME functions (namely, in mu_mime_add_part. * mail/send.c (add_body): New function. Adds original body to the MIME, honoring the --skip-empty-attachment option. * doc/texinfo/programs.texi: Update.
Showing
3 changed files
with
114 additions
and
31 deletions
-
Please register or sign in to post a comment