Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contrib/core/actions/send_mail/send_mail
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [[ -z $trimmed && $SEND_EMPTY_BODY -eq 1 ]] || [[ -n $trimmed ]]; then
cat <<EOF
TO: ${TO}
FROM: ${FROM}
SUBJECT: ${SUBJECT}
SUBJECT: =?UTF-8?B?$(echo ${SUBJECT} | base64)?=
EOF

if [[ -n $ATTACHMENTS ]]; then
Expand Down Expand Up @@ -83,7 +83,7 @@ EOF

cat <<EOF
--${boundary}
Content-Type: ${CONTENT_TYPE}
Content-Type: ${CONTENT_TYPE}; charset=UTF-8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add it here because I thought we don't need it here. This section refers to attachments which should alrady be base64 encoded so it should only contain ascii characters.

Having said that, if it works fine and has no negative side affects, I'm fine with keeping it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it is a bit odd, but when I did not include this, I got garbled non-ascii characters in the e-mail. Not sure why though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: I was wrong, this part also refers to the html version of the body. The section above refers to the attachments so it's correct to have charset here as well.

Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Expand All @@ -92,7 +92,7 @@ EOF
else

cat <<EOF
Content-Type: ${CONTENT_TYPE}
Content-Type: ${CONTENT_TYPE}; charset=UTF-8

EOF

Expand Down