You can send email with attachment via shell script or at shell prompt/command line using mutt or mail command. This will not hide your IP address.
To send anonymous email from shell prompt use Mixmaster, which is the type II remailer protocol and the most popular implementation of it.
Remailers provide protection against traffic analysis and allow sending email anonymously or pseudonymously. Mixmaster consists of both client and server installations and is designed to run on several operation systems including but not limited to *BSD, Linux and Microsoft Windows.
This article explains how to install mixmaster and how to use it to send email, in an anonymous and secure fashion:
An anonymous remailer is a computer service that privatizes your email. A remailer allows you to send electronic mail to a Usenet news group or to a person without the recipient knowing your name or your email address. Anonymous remailers provide protection against traffic analysis.
This package provides both a client and an optional server installation.