All pastes #38396 Raw Edit

Something

public text v1 · immutable
#38396 ·published 2006-01-24 18:21 UTC
rendered paste body
    def send(self,log_type,log):
        print "MAILER: Emergency!! Calling home!"
        addresses = ['me@work'] #this is really a valid address
        email_from = 'ldl_backup_process-NOREPLY@foo.com'
        for email in addresses:
            msg = """From LDL
            To: %s
            From: %s
            Subject: %s
            Content-type: text/plain; charset=\"iso-8859-1\"
            Content-Disposition: inline
            Reply-To: me@home #this is really a valid address
            """ % (email, email_from,log_type)
        msg + "\n\n%s" % log
        server = smtplib.SMTP('localhost.localdomain')
        server.sendmail(email, email_from, msg)
        server.quit()