Changeset 1103


Ignore:
Timestamp:
Sep 8, 2012 9:20:41 PM (10 years ago)
Author:
jemian
Message:

ubuntu emailing support in progress ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pvMail/src/PvMail/pvMail.py

    r1101 r1103  
    274274   
    275275    if 'Ubuntu' in str(os.uname()):     # Ubuntu uses exim
    276         email_program = '/usr/lib/sendmail'
    277         # these commands aren't working!
    278         mail_command = "%s -f %s %s" % (email_program, from_addr, to_addr)
    279         mail_message = [mail_command, "Subject: "+subject, message]
    280         cmd = '''cat << +++ | %s\n+++''' % "\n".join(mail_message)
     276        email_program = '/usr/bin/mail'
     277        mail_command = "%s %s" % (email_program, to_addr)
     278        content = '%s\n%s' % (subject, message)
     279        # TODO: needs to do THIS
     280        '''
     281        cat /tmp/message.txt | mail jemian@anl.gov
     282        '''
     283        cmd = '''echo %s | %s''' % (content, mail_command)
    281284
    282285    msg = "sending email to: %s" % to_addr
Note: See TracChangeset for help on using the changeset viewer.