Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    71

    Unanswered: email script with attachment

    currently i use to send email from unix
    as

    cat filename|mailx -s "XXX" $mail_list

    is there any alternative to send file as attachment?

    Thanks in advance

  2. #2
    Join Date
    Oct 2003
    Location
    East Coast of South Africa
    Posts
    10
    Here is an option but it requires postprint (on Solaris it is in /usr/lib/lp/postscript) and it also requires ps2pdf12 (a program that converts a postscript to pdf so that we can read it)
    command 1
    cat filename | postprint -s 8 -l 85 -n 2 | ps2pdf12 > filename.pdf
    (postprint is formatting the text into 85 lines per page with 2 virtual
    command 2 pages on 1 physical page, optional - you dont have to fo this)
    uuencode filename.pdf filename.pdf | mailx -s "Subject" me@my.domain

    if there is no formatting by postprint required you can pipe all together...

    maybe not what you want but it may cause a spark.

  3. #3
    Join Date
    Sep 2003
    Posts
    71
    Thanks for quick response.

    uuencode works on HP-UX.

    uuencode filename.txt filename.txt|mailx -s "test" $mymail
    wondering how do I use to send mutiple file attachement?

  4. #4
    Join Date
    Oct 2003
    Location
    East Coast of South Africa
    Posts
    10

    Unhappy

    Sorry , dont know that one but it would be nice to know, I am running it for each report that I send. I am happy with it like this because the end user then has the option of putting a filter in her email program and filter by subject. If you do find a way to send multiple attatchment, please post answer... Ta very much!

Posting Permissions

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