Solved

Decode an email subject..

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Script to append xml file 32 191
Sending email via Perl on Windows 3 136
ppm conversion to curl on a module install 8 80
Perl string filter 5 72
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 …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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 is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

932 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

12 Experts available now in Live!

Get 1:1 Help Now