Send email in Python using sendmail

cmdsendemail = "echo \"Mongo has been backed up\" | /usr/sbin/sendmail -F \"MongoSecondary\" server.alerts@company.tld,another.email@company.com"

processsendemail = subprocess.Popen(cmdsendemail, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

sys.exit(0)