Don't take this personal, but I think with a bit more searching you would've found an answered. After a couple of minutes skimming through 10-20 pages with this Google Query: "sendmail" attachment
I found the following:
How about using mutt?
mutt -a attachment -s "this is the subject"
user@emailaddress.com < fileWITHdetail
or
echo "this is the detail" | mutt -a attachment -s this is the subject"
user@emailaddress.com < /dev/null
Usage:
-a <file> attach a file to the message
-b <address> specify a blind carbon-copy (BCC) address
-c <address> specify a carbon-copy (CC) address
-e <command> specify a command to be executed after initialization
-f <file> specify which mailbox to read
-F <file> specify an alternate muttrc file
-H <file> specify a draft file to read header from
-i <file> specify a file which Mutt should include in the reply
-m <type> specify a default mailbox type
-n causes Mutt not to read the system Muttrc
-p recall a postponed message
-R open mailbox in read-only mode
-s <subj> specify a subject (must be in quotes if it has spaces)
-v show version and compile-time definitions
-x simulate the mailx send mode
-y select a mailbox specified in your `mailboxes' list
-z exit immediately if there are no messages in the mailbox
-Z open the first folder with new message, exit immediately if none
-h this help message
You can use mailx (which uses the Sendmail executable) command:
mailx -s "Subject Line" user@somewhere < /name/of/text_file
Reference:http://www.unix.com/solaris/23835-attachment-using-sendmail.htmlAlso see this: http://www.unix.com/shell-programming-scripting/118534-sendmail-attachments.htmlAnd this: http://www.unix.com/shell-programming-scripting/58448-sendmail-attachment.htmlKeep in mind that when you use premade bash scripts, make sure to edit e.g., variables that needs to be set by you.