Skip to content

Using uuencode & mailx To Send Email With Attachment

This is just a short note to myself. The objective is to send a file as an attachment via email.

Linux

  • OS: Ubuntu 8.04.1
  • uuencode is a utility included from sharutils package
  • Method:
    uuencode puaka.txt puaka.txt | mailx -s "Lagenda Puaka" irwan@**.**

HP-UX

  • OS: HP-UX B.11.00
  • Method:
    uuencode 17965.txt 17965.txt | mailx -m -s "Sentuhan Kecundang" irwan@**.**

Why I need to add “-m” option to mailx in HP-UX? I just don’t know. From mailx manual page in HP-UX,

           -m             Do not add MIME header lines Mime Version, Content
                          Type & Content Encoding to the header information
                          while sending mails.

Comments

{ 14 } Comments

  1. mrpiju | September 2, 2008 at 1:34 am | Permalink
    Using Safari Safari 5525.20.1 on Mac OS X Mac OS X 10.5.4

    cool
    nice tips

    Using Safari Safari 5525.20.1 on Mac OS X Mac OS X 10.5.4
  2. mrpiju | September 3, 2008 at 5:26 am | Permalink
    Using Safari Safari 525.20.1 on Mac OS X Mac OS X 10.5.4

    next debian testing name

    http://nion.modprobe.de/blog/archives/650-squeeze.html

    Using Safari Safari 525.20.1 on Mac OS X Mac OS X 10.5.4
  3. Irwan | September 3, 2008 at 5:43 am | Permalink
    Using Safari Safari 525.21 on Windows Windows XP

    Piju,
    I do not use Debian anymore :D

    Using Safari Safari 525.21 on Windows Windows XP
  4. mypapit | September 3, 2008 at 1:11 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.1 on Windows Windows XP

    you do not use Debian anymore? wow mesti hardcore RHEL ni

    Using Mozilla Firefox Mozilla Firefox 3.0.1 on Windows Windows XP
  5. mrpiju | September 3, 2008 at 6:48 pm | Permalink
    Using Safari Safari 5525.20.1 on Mac OS X Mac OS X 10.5.4

    not a debian user anymore ?
    wow!

    Using Safari Safari 5525.20.1 on Mac OS X Mac OS X 10.5.4
  6. piju-mobile | September 4, 2008 at 12:03 am | Permalink
    Using IE Mobile IE Mobile 7.6 on Microsoft PocketPC Microsoft PocketPC

    debianista is dead ;(

    Using IE Mobile IE Mobile 7.6 on Microsoft PocketPC Microsoft PocketPC
  7. irwan | September 4, 2008 at 12:08 am | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.1 on Windows Windows XP

    Papit & Piju,
    Syhhh. I’m a Ubuntunista now :D

    Using Mozilla Firefox Mozilla Firefox 3.0.1 on Windows Windows XP
  8. mrpiju | September 4, 2008 at 12:48 am | Permalink
    Using Safari Safari 525.20.1 on Mac OS X Mac OS X 10.5.4

    sudah lupa daratan nampaknya

    Using Safari Safari 525.20.1 on Mac OS X Mac OS X 10.5.4
  9. Trevor | September 4, 2008 at 1:57 am | Permalink
    Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP

    I think you need the “-m” as uuencoding is not a part of the MIME RFC. it will essentially send the file in a raw form.

    Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP
  10. gio | April 2, 2009 at 5:45 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.8 on Windows Windows Vista

    Hello,

    i want to send (via E-mail) as an attachment a pdf or a ps File using mailx.
    Q1: Is this possible in debian etch (oldstable)?
    Q2: If Yes, what exactly i have to write? Is it exactly like your sample above?

    Thanks for every Help in Advance!

    Using Mozilla Firefox Mozilla Firefox 3.0.8 on Windows Windows Vista
  11. Irwan | April 2, 2009 at 10:20 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.7 on Ubuntu Linux Ubuntu Linux

    Gio,
    Q1: Yes, it’s possible too.
    Q2: Everything should be similar like above.

    Using Mozilla Firefox Mozilla Firefox 3.0.7 on Ubuntu Linux Ubuntu Linux
  12. Thul Dai | May 5, 2009 at 9:14 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.10 on Mac OS X Mac OS X 10

    I’m trying to do this on Mac OS X, but it doesn’t work as the “mail system is down” (message after ‘sendmail -q’).

    Anybody knows what I’d have to start/run to have it work?

    Any hints are appreciated.

    Using Mozilla Firefox Mozilla Firefox 3.0.10 on Mac OS X Mac OS X 10
  13. Irwan | May 6, 2009 at 10:41 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.5 on RedHat Linux RedHat Linux

    Too bad, I don’t have any Mac OS X machine with me.

    Using Mozilla Firefox Mozilla Firefox 3.0.5 on RedHat Linux RedHat Linux
  14. Thul Dai | August 3, 2009 at 4:08 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.0.12 on Mac OS X Mac OS X 10

    On Linux, how does ‘mailx’ know which smtp-server (etc.) to use? Where is that set? Thanks for any help…

    Using Mozilla Firefox Mozilla Firefox 3.0.12 on Mac OS X Mac OS X 10

Post a Comment

Your email is never published nor shared. Required fields are marked *