Search code examples
emailcommand-lineopenwrt

How to send email with attachment on OpenWRT?


I have installed OpenWRT on my ruter with msmtp package. I'm able to send regular email but I can't figure out how to add attachment. I've searched google and it seems that I should use uuencode but I can't find proper package.

The questions are:

  1. does uuencode or it's substitute exists for OpenWRT? If not then:
  2. How to send email with attachment on OpenWRT without uuencode?

Solution

  • You can use mutt. Here is an example how to send an email with attachment:

    echo "This is the message body" | mutt -a "/path/to/file.to.attach" -s "subject of message" -- [email protected]
    

    As of OpenWrt Attitude Adjustment 12.09 the mutt package is available.