W
Why Tea
What is the easiest way to send an email with a text file attachment
(without MIME::LITE, etc)?
/Why Tea
(without MIME::LITE, etc)?
/Why Tea
Why said:What is the easiest way to send an email with a text file attachment
(without MIME::LITE, etc)?
Oh, in that case I would guess by re-implementing significant parts of
MIME::LITE from scratch in your program.
Oh, not really. I have seen bits and pieces about using sendmail or
similar. I'm only after a minimal way of sending an email with a text
attachment without any additional package.
This is not the method I'd use, because I'd be using MIME::Lite, but you
could do a system call to uuencode (to encode your file attachment) and
pass it to the mail command.
I've used this method often and it works like a charm.
M4
Yes, it does work, but it's not as flexible and it unnecessarily spawns
additional processes. This method of sending an email is not "not very
Perlish"; it's most often done in shell scripts. So, do you want to
write a shell script or perl script?
Sometimes I want to write a script that works without installing
additional modules. In medical environments it is simpler to get one
script validated than a script plus installing new modules.
Besides, Perl is a very good glue language, often better suited than the
shell. So yes, maybe I just want to write a shell script and do it in
Perl.
Quoth Why Tea said:Can anyone share a bare minimum plain vanilla Perl script that glues a
few Unix commands to send an email with a text file?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.