Ethereal-dev: Re: [Ethereal-dev] distinguishing multiple files in email and FTP.
Srivathsan_Srinivasagopalan wrote:
I would like to know how SMTP (or any email application like
Outlook) and FTP provides information about clearly distinguishing
between different files which are attached and emailed at once (or
FTP’ed at once using mget *).
SMTP *doesn't* distinguish between them. SMTP doesn't even *know* about
attachments.
If you use, with a BSD-flavored FTP client, "mget *" or "mput *", the
files *aren't* FTP'ed all at once; the FTP client transfers them one at
a time, using separate RETR or STOR operations (along with an NLST
operation to get a list of file names for "mget").
I think SMTP really doesn't care about the files being attached. It
takes all of them in binary format and sees them as a payload. But,
there must be a way to clearly distinguish the end of each files being
attached. I think such facility is provided by the individual
email-clients.
Correct. See RFC 2045 and RFC 2046 - in particular, the parts that talk
about "multipart". The mail message body is a single MIME entity, with
non-text portions of the body encoded as text in some form (such as
base-64), and with text headers separating the parts. That body is
transferred as a single chunk of data over SMTP.
Please let me know the answer for the same if I use FTP.
No. As indicated, each file is transferred in a separate FTP operation.