PDA

View Full Version : Client wants spam fixed.


YFS200
10-24-2001, 05:55 PM
Ok, here is a nasty one.
A client if mine has a newsletter (he never signed up for but whats) that gets email to him once a week. Problem is it's in HTML format. Bad HTML format. Outlook will view it, but any other half way good email program just dies on the poor code to make the banner ads dance.
I just got them to stop using Outlook. :)

I have written a perl scrip that gets run by the email client when this email is received. It recodes the HTML into an attachment. But I am having a problem getting rid of all the =20 in this stupid spam.
I have been trying
$lines =~ s/=20//g;

and other ways including hex without luck.

What is the =20 and how do I kill it?

Thanks
YFS

sheila
10-24-2001, 06:00 PM
The =20 is due to the message being formatted in quoted printable format.

There have been a few messages in these FutureQuest forums that have discussed the quoted printable format. Try searching these forums for quoted printable. I think you will find some good info.

YFS200
10-25-2001, 07:41 PM
Quoted-printable. So that's what it's called.
Thanks for the advice. I found a perl module that would do the conversion, and another one to convert it to Base64. After two days of working on it, I found out all it needed was the correct header. Problem fixed and I did not even need to decode/encode it.

Thanks
YFS

sheila
10-26-2001, 02:11 AM
After two days of working on it, I found out all it needed was the correct header. Problem fixed and I did not even need to decode/encode it.

Well, that's good to hear (in a way). Not that one enjoys spending a lot of unnecessary time to solve a problem the hard way. But it's nice to know, that email clients CAN read messages with the correct header information! ;)

Yes, I only know about quoted-printable for having dealt with my own devils on that issue!