-
Can anyone tell me how to use sendmail and file attachments together?
Thanks
CDitty
------------------
Stop on by and try to win. Someone has to win. Might as well be you.
RedHotSweeps.com
-
Hello,
You can send file attatchments in perl using the sendmail by doing this:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "message is being sent.";
open (MAIL, "|/usr/sbin/sendmail -t");
print MAIL "To: email@domain.com\n";
print MAIL "From: email2@domain2.com\n";
print MAIL "Subject: subject\n\n";
print MAIL "message goes here";
print MAIL "\n\n";
$attachment = 'file.zip';
open(FILE, "uuencode $attachment $attachment|");
while( <FILE> ) { print MAIL; };
close(FILE);
close(MAIL);
I hope this helps you.
-Jason Weinstein
weinstein@sympatico.ca
http://www.maximumedge.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks