CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [xmaverick] Sending Attachment using MIME::Lite: Edit Log



FishMonger
Veteran / Moderator

Sep 1, 2009, 6:36 AM


Views: 3127
Re: [xmaverick] Sending Attachment using MIME::Lite

Try this:


Code
#!/usr/bin/perl 

use strict;
use warnings;

my $from = 'elliot.anico@cellularatsea.com';
my $to = 'eanicom@hotmail.com';
my $cc = 'eanicom@gmail.com';
my $subj = 'Testing';
my $body = "test.txt";


open my $pipe, '|-', '/usr/bin/mailx', '-s',$subj, '-c', $cc, $to, "-f$from",
or die "can't open pipe to mailx: $!\n";

print $pipe `uuencode $body`;

close $pipe;



(This post was edited by FishMonger on Sep 1, 2009, 6:36 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Sep 1, 2009, 6:36 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives