Changeset 1092


Ignore:
Timestamp:
Sep 7, 2012 1:40:02 PM (10 years ago)
Author:
jemian
Message:

new home for documentation
test that sendmail program is available

Location:
pvMail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pvMail/doc/source/index.rst

    r946 r1092  
    44==================================
    55
    6 https://subversion.xray.aps.anl.gov/admin-bcdaext/pvMail
     6http://subversion.xray.aps.anl.gov/admin_bcdaext/pvMail
    77
    88PvMail was built to watch (monitor) an EPICS PV and send an email
  • pvMail/doc/source/info.rst

    r932 r1092  
    3434maintained using sphinx (http://sphinx.pocoo.org),
    3535can be accessed from the WWW at
    36 https://subversion.xray.aps.anl.gov/bcdaext/pvMail/doc/build/html/index.html
     36http://subversion.xray.aps.anl.gov/admin_bcdaext/pvMail
    3737:index:`PvMail project`
    3838and also 
  • pvMail/pvMail.py

    r932 r1092  
    55
    66Documentation:
    7     https://subversion.xray.aps.anl.gov/bcdaext/pvMail/doc/build/html/index.html
     7    http://subversion.xray.aps.anl.gov/admin_bcdaext/pvMail
    88
    99see the help option for immediate details about the command-line::
  • pvMail/src/PvMail/pvMail.py

    r933 r1092  
    8181__institution__ = "Advanced Photon Source, Argonne National Laboratory"
    8282__author_email__= "jemian@anl.gov"
    83 __url__ = "https://subversion.xray.aps.anl.gov/trac/bcdaext/wiki/pvMail"
     83__url__ = "http://subversion.xray.aps.anl.gov/admin_bcdaext/pvMail"
    8484__license__ = "(c) 2009-2012, UChicago Argonne, LLC"
    8585__license__ += " (see LICENSE file for details)"
     
    255255    global gui_object
    256256   
     257    email_program = '/usr/lib/sendmail'
    257258    from_addr = sys.argv[0]
    258259    to_addr = str(" ".join(recipients))
    259     mailprogram = "/usr/lib/sendmail -F %s -t %s" % (from_addr, to_addr)
     260    mailprogram = "%s -F %s -t %s" % (email_program, from_addr, to_addr)
    260261    mail_command = [mailprogram, "Subject: "+subject, message]
    261262    cmd = '''cat << +++ | %s\n+++''' % "\n".join(mail_command)
     
    268269    try:
    269270        logger( "email command:\n" + cmd )
    270         os.popen(cmd)    # send the message
     271        if os.path.exists(email_program):
     272            os.popen(cmd)    # send the message
     273        else:
     274            logger( 'email program (%s) does not exist' % email_program )
    271275    except:
    272276        err_msg = traceback.format_exc()
Note: See TracChangeset for help on using the changeset viewer.