How to pull attachments from letters? Should I attach it to a homemade pop3 client, or is there a separate RFC here?
|
2 answers
Start with Multipurpose Internet Mail Extensions (MIME) . There are many references to related RFCs.
If you write a parser, then to test it, have a look: [Imap-protocol] IMAP4 section numbering algorithm .
|
As far as I remember the specification of the POP3 protocol - there is not a word about attachments, the protocol operates with letters, that is, to receive a letter and delete the letter. Therefore, you need a client who pulls out a message, picks out attachments from them and ... to the account of deleting the message - how the client is configured.
- but after all I get the letter entirely and everything, and in this series of bytes there will be an attachment, that is, by accepting the letter, I immediately accept both the text and the attachment, the other thing is how to isolate the attachment itself and correctly save it? - Dmitry Fedotkin
- oneSMTP and POP - operates with letters, as a certain set of lines, the last of which contains a period. You need a MIME parser. - timka_s 5:57
- Yes, if primitive, then in unix there are several command-line utilities, for example, fetchmail picks up a letter with POP3, and uudeview picks out attachments, and it’s easy to get them to work in pairs. - chernomyrdin
|