Re: email from shell with htm attachment

Re: email from shell with htm attachment

am 03.04.2008 03:51:42 von joe

Just noticed that

I had to remove Content-Transfer-Encoding: quoted-printable
On Apr 2, 9:11 am, "John W. Krahn" wrote:
> joe wrote:
> > Got it to work with a little pipe trick
>
> > cat index.html|/bin/addhead.pl|/sendmail j...@test.com
>
> > #!/usr/bin/perl -w
>
> > use strict;
> > use warnings;
>
> > my $mysubject = join(" ",@ARGV);
> > print< > > Subject: $mysubject
> > MIME-Version: 1.0
> > Content-Type: text/html;
> > charset="windows-1252"
> > Content-Transfer-Encoding: quoted-printable
> > EOF
>
> > my $lows;
>
> > while (my $line = ) {
> > # $lows = lc($line);
> > $lows = $line;
>
> > print "$lows\n";
> > }
>
> Or more simply as:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> print <;
> Subject: @ARGV
> MIME-Version: 1.0
> Content-Type: text/html;
> charset="windows-1252"
> Content-Transfer-Encoding: quoted-printable
> EOF
>
> John
> --
> Perl isn't a toolbox, but a small machine shop where you
> can special-order certain sorts of tools at low cost and
> in short order. -- Larry Wall