Bash, mail and special characters

-1

I tell you, I am sending an email in this way:

 mail -s "$(echo -e "$ASUNTO \nContent-Type: text/html")" $DESTINATARIO  < cuerpo.html

The message arrives to me barbarous, the problem is that the variable $ SUBJECT has as content: "Birthday in Zicco!" and having a Ñ is broken and is left Zicco's employees!

Does anyone know how to make it work? If you sent it manually, the script takes the eñe perfectly, but if the croneo stops working and sends it with that visual error.

Thank you!

    
asked by JuanManuel245 29.08.2018 в 19:40
source

1 answer

1

You should define the format in the metadata.

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

You can define it in your variable in the following way:

"Birthday & Zicco Birthday!";

    
answered by 29.08.2018 в 19:45