Hello everybody,

I upgraded Debian squeeze to buster and changed our mailutils version and the mailing scripts I have for some automation stopped working.

I can not get Content-Disposition set to inline for the text/plain part.

I want to have an mail with a plain/text message shown inline (not as attachment) and an PDF file as attachment.

We are using Mozilla Thunderbird 78.11.0-1~deb10u1 as mail client for showing the messages.

The first example is what I used to have that used to work, but it does not show the text any-more because it sets the Content-Disposition to attachment.. for the plain/text.

EMAIL=jelledej...@powercraft.nl
NAMEWITHHOUSENUMBER=1234AB1
LASTNAME="de Jong"
CONTENT="Geachte heer en/of mevrouw $LASTNAME,\n\nHartelijk dank voor uw aanvraag voor organization-advies.\n"


echo -e "$CONTENT" | mail.mailutils -s "organization-advies: ($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a "From: organization B.V. <i...@organization.com>" "$EMAIL"

# wrong for plain test part...
# Content-Type: application/octet-stream
# Content-Disposition: attachment
# Content-Transfer-Encoding: 8bit
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: ($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream --content-filename=organization-flyer.pdf --attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a "From: organization B.V. <i...@organization.com>" "$EMAIL"

# creates a three part message all with the wrong Content-Disposition: attachment emily:~# echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: ($NAMEWITHHOUSENUMBER)" --content-type=text/plain --attach-fd=0 --content-type=application/octet-stream --content-filename=organization-flyer.pdf --attach=/root/organization-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a "From: organization B.V. <i...@organization.com>" "$EMAIL"

# Segmentation fault
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: ($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream --content-filename=organization-flyer.pdf --attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a "From: organization B.V. <i...@organization.com>" "$EMAIL" --alternative

What to do to create my plain/text incline message with attached pdf document?

Kind regards,

Jelle de Jong

Reply via email to