Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] How to send an email attachment using PERL?

Expand Messages
  • Godwin Stewart
    ... No. It *has* to be encoded. It can be either encoded in base64 as a MIME section, or uuencoded inline. Both encoding methods convert the 8-bit binary data
    Message 1 of 8 , Dec 1, 2001
    • 0 Attachment
      On Sat, 01 Dec 2001 00:50:40 -0000, hereitis@... wrote:

      > Godwin, As you have told, I'm constructing the MIME message myself
      > only. but I'm having some trouble using it. Can you tell me whether
      > its absolutely necessary to encode the file? Can I not send the file
      > as binary itself? I was trying to send image file as a start.

      No. It *has* to be encoded. It can be either encoded in base64 as a MIME
      section, or uuencoded inline. Both encoding methods convert the 8-bit binary
      data to 7-bit text. This is imposed by RFC-822, "Standard for ARPA Internet
      Text Messages", the key word here being "Text".

      MIME - Multipurpose Internet Mail Extensions - are just an extension of
      RFC-822. The format is governed by another RFC document, RFC-1521 IIRC.

      BTW, well done for the "MIME-Version: 1.0" header, I forgot that!

      --
      ____________________________________________
      | G. Stewart -- gstewart@... |
      | Port de Pontille, FR-37500 CHINON, FRANCE. |
      ____________________________________________
    • hereitis@netscape.net
      Hi Godwin, Thanks again.. I know very little about all those RFC standards :o( Let me tell you my requirement. I ve a web-site and my site visitors input their
      Message 2 of 8 , Dec 2, 2001
      • 0 Attachment
        Hi Godwin,
        Thanks again..
        I know very little about all those RFC standards :o(
        Let me tell you my requirement.
        I've a web-site and my site visitors input their email address,
        and then I've to send a zip file to their e-mail address.

        So my mail message once encoded can be a static text file except
        the "To" part. Could you please provide me the RAW MIME code
        with a sample uuencoded or base64 data?

        Also I work on windows NT. How can I encode the zip file in
        the respective encoding format?

        Kiran

        --- In perl-beginner@y..., Godwin Stewart <gstewart@s...> wrote:
        > On Sat, 01 Dec 2001 00:50:40 -0000, hereitis@n... wrote:
        >
        > > Godwin, As you have told, I'm constructing the MIME message
        myself
        > > only. but I'm having some trouble using it. Can you tell me
        whether
        > > its absolutely necessary to encode the file? Can I not send the
        file
        > > as binary itself? I was trying to send image file as a start.
        >
        > No. It *has* to be encoded. It can be either encoded in base64 as a
        MIME
        > section, or uuencoded inline. Both encoding methods convert the 8-
        bit binary
        > data to 7-bit text. This is imposed by RFC-822, "Standard for ARPA
        Internet
        > Text Messages", the key word here being "Text".
        >
        > MIME - Multipurpose Internet Mail Extensions - are just an
        extension of
        > RFC-822. The format is governed by another RFC document, RFC-1521
        IIRC.
        >
        > BTW, well done for the "MIME-Version: 1.0" header, I forgot that!
        >
        > --
        > ____________________________________________
        > | G. Stewart -- gstewart@s... |
        > | Port de Pontille, FR-37500 CHINON, FRANCE. |
        > ____________________________________________
      • Godwin Stewart
        ... The easiest thing would be for you to write (without sending) an e-mail with the attachment you want to send. Then look at the source of that e-mail. Which
        Message 3 of 8 , Dec 2, 2001
        • 0 Attachment
          On Sun, 02 Dec 2001 19:40:44 -0000, hereitis@... wrote:

          > Could you please provide me the RAW MIME code with a sample uuencoded or
          > base64 data?

          The easiest thing would be for you to write (without sending) an e-mail with
          the attachment you want to send. Then look at the source of that e-mail.
          Which MUA are you using? The keystroke in Outlook Express (and possibly
          Outlook too) for getting at the e-mail source is Ctrl-F3, Netscape's is
          Ctrl-U.

          Strip out all of the headers except "From:", "To:", "Subject:",
          "Content-Type:" and "MIME-Version:". If you don't put a "Date:" header in,
          the SMTP server *should* add it for you.

          --
          ____________________________________________
          | G. Stewart -- gstewart@... |
          | Port de Pontille, FR-37500 CHINON, FRANCE. |
          ____________________________________________
        • k_0_b
          OK. thanks godwin. my job is done!! I searched for base64 encoder and tried sending the mail and it worked :o). If anybody needs help regarding this, let me
          Message 4 of 8 , Dec 5, 2001
          • 0 Attachment
            OK. thanks godwin. my job is done!!
            I searched for base64 encoder and tried sending the mail and it
            worked :o).

            If anybody needs help regarding this, let me know. I'll put
            the details when I got time.

            Thanks again to all of you who helped me in this.

            -Kiran


            --- In perl-beginner@y..., Godwin Stewart <gstewart@s...> wrote:
            > On Sun, 02 Dec 2001 19:40:44 -0000, hereitis@n... wrote:
            >
            > > Could you please provide me the RAW MIME code with a sample
            uuencoded or
            > > base64 data?
            >
            > The easiest thing would be for you to write (without sending) an e-
            mail with
            > the attachment you want to send. Then look at the source of that e-
            mail.
            > Which MUA are you using? The keystroke in Outlook Express (and
            possibly
            > Outlook too) for getting at the e-mail source is Ctrl-F3,
            Netscape's is
            > Ctrl-U.
            >
            > Strip out all of the headers except "From:", "To:", "Subject:",
            > "Content-Type:" and "MIME-Version:". If you don't put a "Date:"
            header in,
            > the SMTP server *should* add it for you.
            >
            > --
            > ____________________________________________
            > | G. Stewart -- gstewart@s... |
            > | Port de Pontille, FR-37500 CHINON, FRANCE. |
            > ____________________________________________
          Your message has been successfully submitted and would be delivered to recipients shortly.