I don't know this command. What OS/distribution are you using? If smtpmail is a wrapper around the standard Unix mail program, indeed that program does not (usually) have the ability to send attachments. To do this at the command line, I would personally use mutt. mutt however will send via the local SMTP server, so that would need to be configured first.