He is asking about perl. With perl you open a filehandle to a sendmail pipe and basically just print to the filehandle. You send your own headers and do your own encoding, and that is where people get a bit confused with perl and sendmail because you have to do what the email client would be doing, sendmail does exactly what its name says, sends mail. IIRC, mail is a little command line client thingy that uses your MTA. But I could be wrong. I know that "mail" gives me my mail and "d root" gets rid of crons messages :-).
On Tue, 27 May 2003 08:28:58 -0700 (PDT) - BradDe Vries <[EMAIL PROTECTED]> wrote the following Re: Re: How to send windows attachment using senmail >--- Swapana Ghosh <[EMAIL PROTECTED]> wrote: >> My question is as follows: >> 2. How can i send an attachment through >> the sendmail. >> >> Thanks in advance >> -Swapna > >I don't typically use sendmail as my e-mail client, >although I think it's possible. I use the "mail" >command for this type of work. Here's an example >shell script which will attach a file. > >Brad. >-------------- >#!/bin/sh > ># initialize >FILE=$1 >TMPFILE=/tmp/email.$$ > ># validate >if [ ! -f $FILE ]; then > echo "File not found: $FILE" > exit 1 >fi > ># prepare message >cat << EOF > $TMPFILE >This is the body of the message... > >The attachment is at the end. >EOF > ># encode and attach the file >BASENAME=`basename $FILE` >uuencode $FILE $BASENAME >> $TMPFILE > ># send the message >mail -s "Subject line here" [EMAIL PROTECTED] < >$TMPFILE > ># clean up >rm -f $TMPFILE >-------------- > >__________________________________ >Do you Yahoo!? >The New Yahoo! Search - Faster. Easier. Bingo. >http://search.yahoo.com >_______________________________________________ >Linux-users mailing list >[EMAIL PROTECTED] >Unsubscribe/Suspend/Etc -> >http://www.linux-sxs.org/mailman/listinfo/linux-users _______________________________________________ Linux-users mailing list [EMAIL PROTECTED] Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users