Can't reproduce the error using Mime::Lite.
You can get anomalous behaviour if you assign your $text from the command
prompt.
eg. if I have in my script:
print "Enter text message";
$text = <STDIN>;
and I enter '£12.50', then it appears (for me) in the received email
as 'o12.50'.
If my script simply has '$text = "£12.50";' then it is received as '£12.50'.
I couldn't find a way of receiving '50' :-)
Maybe there's another way of assigning to $text that does produce the
anomaly you're experiencing. How are you assigning the value to $text ?
Odd... but I have actually added print "$text" just prior to the sendmail print routines and it does display the pound sterling sign correctly. My actual routine is set out below:
I wonder if it is a problem with the server being in North America??
sub Send_Mailshot
{
local (@all_entries);
$mailprog = '/usr/sbin/sendmail -oi -t';
$authormail=@_[0];
$guestaddress=@_[1];
$maillist=@_[2];
$subject=@_[3];
$text=@_[4];
if (open(EMAIL, $maillist))
{
# make sure pointer is at the start of file
seek (EMAIL,0,0);
while (<EMAIL>)
{
# grab line of text
$line = sprintf("$_");
if (/^#/)
{
# ignore remark lines
}
else
{
# split line into elements and store in array
@all_entries=split(/,/, $line);
# check if we can email this person
$OK_to_email=@all_entries[3];
if ($OK_to_email)
{
# Grab the email address and name for this person
# and send the specified text to them
$EMAIL_address=@all_entries[1];
$NAME=@all_entries[2];
if ($EMAIL_address)
{
# Send email text
# print "$text"; at this point shows the £ symbol and valuecorrectly
$returnmail="RWAPSoftware\@aol.com";
open (MAIL, "|$mailprog") || die "Can't open $mailprog!\n";
print MAIL "From: $authormail\n";
print MAIL "To: $EMAIL_address\n";
print MAIL "Subject: $subject\n\n";
print MAIL "If you have any queries about this email, please email: $authormail. \n";
print MAIL "--------------------------------------------------------------------------\n\n";
print MAIL "For the Attention of : $NAME\n\n";
print MAIL "$text\n";
print MAIL "--------------------------------------------------------------------------\n\n";
print MAIL "Please note that you have received this email because you have added your\n";
print MAIL "email address to the guestbook at $guestaddress.\n";
print MAIL "If you wish to be removed from this mailing list, please forward this email to $returnmail\n";
print MAIL "with the word REMOVE in the subject line.\n";
close (MAIL);
}
}
}
}
close(EMAIL);
}
}
--
Rich Mellor
RWAP Software
35 Chantry Croft, Kinsley, Pontefract, West Yorkshire, WF9 5JH
TEL: 01977 610509
http://hometown.aol.co.uk/rwapsoftware