Subject: | Cannot send email with Arabic body |
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Builder::Simple;
my $mail = Mail::Builder::Simple->new;
$mail->send(
from => 'yousef@yousef.org',
to => 'yousef@yousef.org',
subject => "\x{062A}\x{062C}\x{0631}\x{0628}\x{0629}", # 'test' in Arabic (unicode)
plaintext => "\x{062A}\x{062C}\x{0631}\x{0628}\x{0629}", # ditto
);
print "Done.\n";
My script dies with the following:
open body: Invalid argument at /home/yousef/.perlbrew/libs/perl-5.20.0@env1/lib/perl5/MIME/Entity.pm line 1878.
If the plaintext *starts* with a latin character, then everything works fine (subject can be anything as long as the plaintext does not start with Arabic text). Using version 0.16 of Mail::Builder::Simple.