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

Sending mail, with an attachments, with limited module options.

Expand Messages
  • franki
    Hi guys, I just knocked up a simple script for a friend which is designed such that it requires a user to register with the script before it emails them a
    Message 1 of 3 , Feb 1, 2004
      Hi guys,

      I just knocked up a simple script for a friend which is designed such
      that it requires a user to register with the script before it emails
      them a file.. The script was successfully working on my server using
      Mime::Lite.. However her server has limited options with regards to
      installed modules, and this person is a total newbie with no shell
      access, so teaching her to install a module into her own account would
      be near impossible..

      Anyway, I knocked up a little file::find script to work out what modules
      she has available to her.. and the only mail (outgoing) related modules
      I see in the list are NET::SMTP.
      The total module list is below, I have removed a heap that are not
      relevant to this question from the list.

      Anyway, I looked at using "lib" and including sender.pm in her home
      directory.. which I have done before... (thanks Jenda)

      but looking in Sender.pm indicates that it needs MIME::Base64 and
      MIME::QuotedPrint to send attachments...
      I didn't see either in this list of modules.. (it seems the ISP has
      intentionally left out mailing modules.. as the rest of the list is
      quiet comprehensive..)

      So my question is, what is the simpliest method of sending an email
      with an attachment using only the modules displayed in the below list.
      (or others like sender.pm that can simply be put onto the host and
      "used" with use lib..)

      regards

      Franki



      The installed module list:
      ---------------------------
      /usr/lib/perl5/Quota.pm
      /usr/share/perl5/URI.pm
      /usr/share/perl5/DebianNet.pm
      /usr/share/perl5/URI/mailto.pm
      /usr/share/perl5/URI/pop.pm
      /usr/share/perl5/URI/_server.pm
      /usr/share/perl5/URI/WithBase.pm
      /usr/share/perl5/Net/POP3.pm
      /usr/share/perl5/Net/Domain.pm
      /usr/share/perl5/Net/SMTP.pm
      /usr/share/perl5/Net/Time.pm
      /usr/share/perl5/Net/NNTP.pm
      /usr/share/perl5/Net/Cmd.pm
      /usr/share/perl5/Net/Netrc.pm
      /usr/share/perl5/Net/FTP.pm
      /usr/share/perl5/Net/HTTP.pm
      /usr/share/perl5/Net/HTTPS.pm
      /usr/share/perl5/Debian/AdduserCommon.pm
      /usr/lib/perl/5.6.1/Config.pm
      /usr/lib/perl/5.6.1/DynaLoader.pm
      /usr/lib/perl/5.6.1/Errno.pm
      /usr/lib/perl/5.6.1/Fcntl.pm
      /usr/lib/perl/5.6.1/IO.pm
      /usr/lib/perl/5.6.1/POSIX.pm
      /usr/lib/perl/5.6.1/Socket.pm
      /usr/lib/perl/5.6.1/XSLoader.pm
      /usr/lib/perl/5.6.1/ByteLoader.pm
      /usr/lib/perl/5.6.1/re.pm
      /usr/lib/perl/5.6.1/B.pm
      /usr/lib/perl/5.6.1/O.pm
      /usr/lib/perl/5.6.1/GDBM_File.pm
      /usr/lib/perl/5.6.1/DB_File.pm
      /usr/lib/perl/5.6.1/NDBM_File.pm
      /usr/lib/perl/5.6.1/ODBM_File.pm
      /usr/lib/perl/5.6.1/Opcode.pm
      /usr/lib/perl/5.6.1/Safe.pm
      /usr/lib/perl/5.6.1/ops.pm
      /usr/lib/perl/5.6.1/SDBM_File.pm
      /usr/lib/perl/5.6.1/attrs.pm
      /usr/share/perl/5.6.1/AutoLoader.pm
      /usr/share/perl/5.6.1/Carp.pm
      /usr/share/perl/5.6.1/Cwd.pm
      /usr/share/perl/5.6.1/Exporter.pm
      /usr/share/perl/5.6.1/FileHandle.pm
      /usr/share/perl/5.6.1/SelectSaver.pm
      /usr/share/perl/5.6.1/Symbol.pm
      /usr/share/perl/5.6.1/attributes.pm
      /usr/share/perl/5.6.1/base.pm
      /usr/share/perl/5.6.1/constant.pm
      /usr/share/perl/5.6.1/fields.pm
      /usr/share/perl/5.6.1/integer.pm
      /usr/share/perl/5.6.1/lib.pm
      /usr/share/perl/5.6.1/locale.pm
      /usr/share/perl/5.6.1/overload.pm
      /usr/share/perl/5.6.1/strict.pm
      /usr/share/perl/5.6.1/vars.pm
      /usr/share/perl/5.6.1/warnings.pm
      /usr/share/perl/5.6.1/AnyDBM_File.pm
      /usr/share/perl/5.6.1/AutoSplit.pm
      /usr/share/perl/5.6.1/Benchmark.pm
      /usr/share/perl/5.6.1/CGI.pm
      /usr/share/perl/5.6.1/CPAN.pm
      /usr/share/perl/5.6.1/DB.pm
      /usr/share/perl/5.6.1/DirHandle.pm
      /usr/share/perl/5.6.1/Dumpvalue.pm
      /usr/share/perl/5.6.1/English.pm
      /usr/share/perl/5.6.1/Env.pm
      /usr/share/perl/5.6.1/Fatal.pm
      /usr/share/perl/5.6.1/FileCache.pm
      /usr/share/perl/5.6.1/FindBin.pm
      /usr/share/perl/5.6.1/SelfLoader.pm
      /usr/share/perl/5.6.1/Shell.pm
      /usr/share/perl/5.6.1/Test.pm
      /usr/share/perl/5.6.1/UNIVERSAL.pm
      /usr/share/perl/5.6.1/autouse.pm
      /usr/share/perl/5.6.1/blib.pm
      /usr/share/perl/5.6.1/bytes.pm
      /usr/share/perl/5.6.1/charnames.pm
      /usr/share/perl/5.6.1/diagnostics.pm
      /usr/share/perl/5.6.1/filetest.pm
      /usr/share/perl/5.6.1/less.pm
      /usr/share/perl/5.6.1/open.pm
      /usr/share/perl/5.6.1/sigtrap.pm
      /usr/share/perl/5.6.1/subs.pm
      /usr/share/perl/5.6.1/utf8.pm
      /usr/share/perl/5.6.1/Pod/Functions.pm
      /usr/share/perl/5.6.1/Pod/Checker.pm
      /usr/share/perl/5.6.1/Pod/Find.pm
      /usr/share/perl/5.6.1/Pod/InputObjects.pm
      /usr/share/perl/5.6.1/Pod/Html.pm
      /usr/share/perl/5.6.1/Pod/ParseUtils.pm
      /usr/share/perl/5.6.1/Pod/LaTeX.pm
      /usr/share/perl/5.6.1/Pod/Man.pm
      /usr/share/perl/5.6.1/Pod/ParseLink.pm
      /usr/share/perl/5.6.1/Pod/Parser.pm
      /usr/share/perl/5.6.1/Pod/Plainer.pm
      /usr/share/perl/5.6.1/Pod/Select.pm
      /usr/share/perl/5.6.1/Pod/Text.pm
      /usr/share/perl/5.6.1/Pod/Usage.pm
      /usr/share/perl/5.6.1/File/Spec.pm
    • Jenda Krynicky
      From: franki ... Then just install MIME::QuotedPrint and MIME::Base64 the same way. Actually if you happen to have the same version of
      Message 2 of 3 , Feb 1, 2004
        From: franki <franki@...>
        > I just knocked up a simple script for a friend which is designed such
        > that it requires a user to register with the script before it emails
        > them a file.. The script was successfully working on my server using
        > Mime::Lite.. However her server has limited options with regards to
        > installed modules, and this person is a total newbie with no shell
        > access, so teaching her to install a module into her own account would
        > be near impossible..
        >
        > Anyway, I knocked up a little file::find script to work out what
        > modules she has available to her.. and the only mail (outgoing)
        > related modules I see in the list are NET::SMTP. The total module list
        > is below, I have removed a heap that are not relevant to this question
        > from the list.
        >
        > Anyway, I looked at using "lib" and including sender.pm in her home
        > directory.. which I have done before... (thanks Jenda)
        >
        > but looking in Sender.pm indicates that it needs MIME::Base64 and
        > MIME::QuotedPrint to send attachments... I didn't see either in this
        > list of modules.. (it seems the ISP has intentionally left out mailing
        > modules.. as the rest of the list is quiet comprehensive..)

        Then just install MIME::QuotedPrint and MIME::Base64 the same way.
        Actually if you happen to have the same version of Perl and OS you
        can compile any module on your computer, upload the resulting files
        to hers and use lib ...

        If the module doesn't contain any XS code then you should be able to
        do this regardless of OS and Perl version.

        Jenda

        ===== Jenda@... === http://Jenda.Krynicky.cz =====
        When it comes to wine, women and song, wizards are allowed
        to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery
      • franki
        ... Thanks, I was hoping that there was an easier way of sending attachments.. but no matter.. I ll see what I can do. rgds Franki
        Message 3 of 3 , Feb 1, 2004
          Jenda Krynicky wrote:
          > Then just install MIME::QuotedPrint and MIME::Base64 the same way.
          > Actually if you happen to have the same version of Perl and OS you
          > can compile any module on your computer, upload the resulting files
          > to hers and use lib ...
          >
          > If the module doesn't contain any XS code then you should be able to
          > do this regardless of OS and Perl version.
          >
          > Jenda
          >

          Thanks, I was hoping that there was an easier way of sending
          attachments.. but no matter..
          I'll see what I can do.

          rgds

          Franki
        Your message has been successfully submitted and would be delivered to recipients shortly.