Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Welcome tenny1204,

I'm not familiar with Net::IMAP:Client, but I have written a full email package in Perl for a web mail system, and that series of packages took 2+ years to develop and I already had 10+ years working with email and Perl. I recommend that you get a copy of an O'Reilly book called "Programming Internet Email" written by David Wood. I got my copy used, but it was a great help in answering so many basic/advanced email questions. The most important part is that the examples are written in Perl (and Java), and Perl is what I needed. Also what helped me was the explanation of the terms and the rules for building a RFC compliant email.

Now I'm going to guess how to help you.

Once you use MIME, the format of the email document changes. Every part of the email is now controlled by '"Content-Type: ... boundary="..."'. Even the Capitalization of words used in the headers is mandatory.

Now guessing, the parts of the "body" (which could be a series of nested multi-part messages) needs to be encoded without the headers and the headers have to be separated by two "\r\n" before and after the encoded message. So you need to make sure the boundary headers are not part of the encoded document.

I use the free Mozilla Thunderbird and if you display a MIME email and then type '^U' (control U), you will see how the raw email is received by Thunderbird. This can help you determine if your generated email looks like the one generated by Thunderbird. I found other clients show the translated email and not the raw input.

Good Luck...Ed

"Well done is better than well said." - Benjamin Franklin


In reply to Re: decoding email attachments. by flexvault
in thread decoding email attachments. by tenny1204

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found