Solved

Decode an email subject..

Posted on 2001-07-03
2
3,489 Views
Last Modified: 2012-08-13
Hi, I want to decode this email subject:

Subject: =?iso-8859-1?B?VGVzdGluZyBlbWFpbCBoZWFkZXJz?=

It was generated using MailStudio @Message from 3rsoft.com, but I don't know what kind of codification is using..

I tried using the MIME::Base64 decode function but it didn't work.

The "translation" of the subject is: Testing email headers

Could you help me?
There are also another lines of the email header that are encoded, like the From line. I guess that it can be decoded using the same script that will decode the Subject line.

Thanks.
0
Comment
Question by:jcao
2 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 200 total points
ID: 6250963
------------------ sample ---------------------
use MIME::Base64;

if ($subject=~/^=\?[\w-]+\?B\?(.*)\?=$/) {
    $subject=decode_base64($1);
}
-----------------------------------------------

- Sapa
0
 

Author Comment

by:jcao
ID: 6252924
Thank you very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video discusses moving either the default database or any database to a new volume.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now