Sending mail with attachments from command line


Results 1 to 2 of 2

Thread: Sending mail with attachments from command line

  1. #1
    Join Date
    Nov 2002
    Location
    Minnesota, USA
    Posts
    160

    Sending mail with attachments from command line

    I'm trying to figure out how to send an automatic email each week with an attachment on it. I know how to use mail to send something, but from what I can tell, you can't attach files with mail. I've also looked at mutt, which can do attachments, but I can't seem to get it to work right.

    Can anyone show me the syntax for mail or mutt, or another option, for how I could do what I want. Let's assume the recipient is person@abc.com and the file to attach is weekly.txt.

    Thanks for the input.
    "We're on a mission from God"
    --Elwood Blues

    Registered Linux User #296184
    Get Counted. http://counter.li.org

  2. #2
    Join Date
    Nov 2003
    Posts
    105
    This should work:
    Code:
    mutt -s "subject" -a weekly.txt person@abc.com  < /dev/null

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •