jetmore / swaks

Swaks - Swiss Army Knife for SMTP
http://jetmore.org/john/code/swaks/
GNU General Public License v2.0
848 stars 86 forks source link

Combination of swithes: add-header and attach-body (html) #40

Closed stemberajan closed 2 years ago

stemberajan commented 2 years ago

If I send the email with these switches: --add-header "Content-Type: text/html; charset=UTF-8" and --attach-type text/html --attach-body @/something

received email is without html body.

If I send it only with --attach-type text/html --attach-body @/something, everything is ok.

Is possible to say(to write down switches): the email is in UTF-8 and it has the html attachment?

jetmore commented 2 years ago

You can't do this with current functionality (unless you craft the entire message by hand and pass it in with --data. The issue is that --add-header "Content-Type: text/html; charset=UTF-8" would add a top-level header to the email, but attach changes the message into a MIME email and you wand to set the charset=UTF-8 on the mimepart. This is technically a duplicate to #32 so I'm going to close this as a dupe. Feel free to reopen if I'm missing something or add more detail to the other issue.

jetmore commented 2 years ago

Duplicate of #32