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!

In reply to Mail::Sender character set/encoding by Rodster001

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.