Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-25 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found