http://qs321.pair.com?node_id=750241

Rodster001 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings!

I am using Mail::Sender and when I send an email, characters like ’ (hex 0x92), and ” (hex 0x94), etc are displaying as a □.

I should mention that the display problem actually happens in Outlook. If I "view source" on the email message, and open it in a text editor, the correct character is there (and has the same hex value). So, I am guessing this is a problem with not with the actual encoding, but a missing header so Outlook will display properly? I also forwarded the message to my Gmail account and in that case the characters are just being omitted. So, I really don't know, but I am stuck.

Anyway, if anyone knows a solution to this it would be much appreciated!

Code below. Note: I have tried both the SendEnc and SendLineEnc methods and encoding types both "quoted-printable" and "7bit". All with the same result.

my $sender = new Mail::Sender { smtp => "localhost", from => "me@myhost.com", } or die "Can't create Mail::Sender object: $Mail::Sender::Error\n"; $sender->Open({ to => "someone@somewhere.com", subject => "My Subject", ctype => 'text/html; charset=us-ascii', encoding => "quoted-printable", }) or die "Can't open the message: $sender->{'error_msg'}\n"; $sender->SendEnc($message); $sender->Close();
Thanks for your help!