Versions Compared


    • This line was added.
    • This line was removed.
    • Formatting was changed.
    Comment: Published by Scroll Versions from this space and version 7.5-0


    Code Block
    titleMail callback example
    import qb
    def main():
        # Set basic job properties
        job = {}
        job['name']         = 'cmdline with email callback'
        job['prototype']    = 'cmdline'
         # Set the package properties
        job['package']      = {}
        job['package']['cmdline'] = 'set'
         # Create the email callback and set the address to send it to
        # NOTE: Make sure that the Qube Supervisor has the email settings configured
        job['mailaddress'] = ''
        job['callbacks'] = [{'triggers':'done-job-self', 'language':'mail'}]
        # Submit
        listOfSubmittedJobs = qb.submit([job])
         # Report on submit results
        for job in listOfSubmittedJobs:
            print (job['id'])
    if __name__ == "__main__":

    See the mail_* parameters from Configuration Parameter Reference for how to both setup mail and adjust the various mail templates.