bugGNU Mailutils - Bugs: bug #60506, Wrong content-type of mail body...


bug #60506: Wrong content-type of mail body when using attachment

Submitter:  None
Submitted:  Mon 03 May 2021 09:45:46 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  gray
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup

Mon 03 May 2021 11:26:01 AM UTC, comment #3: 

It should be clear enough from the context: the previous paragraph says: "The --content-type option affects all --attach options that follow it, and the message body (if any)."

Sergey Poznyakoff <gray>
Group administrator
Mon 03 May 2021 11:09:36 AM UTC, comment #2: 

It is not obvious in the documentation that it is required to do so. It just says that it can be used to change the content-type of the body (which is usually not something you would want to). It is reasonable to assume that the content-type would be text/plain unless specifically set to something else.

Mon 03 May 2021 10:57:50 AM UTC, comment #1: 

This is the documented behavior. Quoting the documentation: "To change the content type of the message body when sending a message with attachments, use the trailing '--content-type' option, i.e. the option not followed by another '--attach' option. 

Please, see https://mailutils.org/manual/html_node/MIME.html

Sergey Poznyakoff <gray>
Group administrator
Mon 03 May 2021 09:45:46 AM UTC, original submission:  

content-type affects the body type, which is a bit unexpected.


 echo Mail body | mail rcpt@domain --content-type=text/csv -A file.csv

The mail body then becomes an attachment with the wrong content-type, and the email is shown as having no message body.

It can be fixed by adding "--content-type=text/plain" at the end of the command line, but this should not be needed.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by gray (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-22 gray Open/ClosedOpen Closed
    2021-05-03 gray StatusNone Invalid
        Assigned toNone gray

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code