Solved

Decode an email subject..

Posted on 2001-07-03
2
3,518 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SIMPLE Perl Regex 1 159
How to send output of ping to syslog (with timestamp and optional comments) 3 213
collecting information 2 163
Using Perl DBI to query oracle 3 43
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…

825 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