How to encode mail subject in perl?

Viewed 7501

How to encode mail subject in perl ?

Now I finally found something but it's still not working :

use MIME::Words qw/encode_mimewords/;
$recipientsubject = encode_mimewords('Votre fichier a bien été envoyé');

But the (bugged) result is :

Subject: Votre fichier a bien =?ISO-8859-1?Q?=E9t=E9?= =?ISO-8859-1?Q?envoy=E9?=

Which displays :

Votre fichier a bien étéenvoyé

(It eats some spaces)

2 Answers
Related