AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  how to mail users

    Posted Thu July 21, 2011 10:49 AM

    Originally posted by: misteraix


    hi
    i have a script in my aix box which executes every day through cron
    im the sybase user in my system
    i have also piped the output of the script to a file and it works fine
    now i also need the output to be sent to me as an email
    how to do this ?
    #AIX-Forum


  • 2.  Re: how to mail users

    Posted Thu July 21, 2011 11:13 AM

    Originally posted by: SystemAdmin


    mailx should work ...
    try mailx -s subject destination < yourfile

    try some test emails from the command line ... if it doesnt appear to work try using -v flag for verbose...
    man mailx for more information.

    Charlie
    #AIX-Forum


  • 3.  Re: how to mail users

    Posted Thu July 21, 2011 11:17 AM

    Originally posted by: orphy


    You can just do something like this after you have the output file.

    mailx -s "<subject_line>" <email_address> < "

    e.g. If your output file name is /tmp/xyz.out and your email address is misteraix@misteraix.org, you can do something like this:

    mailx -s "content of output file" misteraix@misteraix.org < /tmp/xyz.out
    Orphy
    #AIX-Forum


  • 4.  Re: how to mail users

    Posted Fri July 22, 2011 11:35 AM

    Originally posted by: mmveiga


    If the AIX server cannot deliver mail direct to the "misteraix.org" domain, you may also need to set DS on /etc/mail/sendmail.cf , a good reference for Sendmail on AIX is http://www.ibm.com/developerworks/aix/library/au-sendmail_on_aix/index.html

    Regards,
    Marcelo.
    #AIX-Forum