Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

GT::Mail - can not change header_charset

Quote Reply
GT::Mail - can not change header_charset
I can not set header_charset header item to ISO-8859-2 in GT::Mail.

It always uses ISO-8859-1.


I tried several solutions,
Code:
my $mailer = GT::Mail->new(
'header_charset' => 'ISO-8859-2'
);
or
Code:
$mailer->args(
'header_charset' => 'ISO-8859-2'
);

but same result, header items are always encoded into ISO-8859-1.


Here is the whole code I use for testing:
Code:
use strict;
use warnings;

use Data::Dumper;
use GT::Mail;


# Get a new mailer object
my $mailer = GT::Mail->new(
# 'header_charset' => 'ISO-8859-2'
);

#$mailer->args(
# 'header_charset' => 'ISO-8859-2'
#);

$mailer->set('header_charset', 'ISO-8859-2');

# Input a text email string, with full header
my $mail_txt = q|To: Hisname <info@hisdomain.com>
From: Myname <me@mydomain.com>
Errors-To: Hisname <info@hisdomain.com>
Subject: Test email subject - áíûõüöúóé

test email message body - áíûõüöúóé
|;

# Parse the string
$mailer->parse($mail_txt);

# Flatten mail object into string
my $mail_result = $mailer->as_string();
print '$mail_result: ' . Dumper(\$mail_result) . "";


Is this a bug, or I do something wrong?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Dec 25, 2005, 3:06 PM
Subject Author Views Date
Thread GT::Mail - can not change header_charset webmaster33 3043 Dec 25, 2005, 2:53 PM
Thread Re: [webmaster33] GT::Mail - can not change header_charset
brewt 2963 Jan 3, 2006, 7:36 PM
Post Re: [brewt] GT::Mail - can not change header_charset
webmaster33 2943 Jan 4, 2006, 7:59 AM
Post Re: [brewt] GT::Mail - can not change header_charset
webmaster33 2921 Jan 4, 2006, 9:32 AM