def sendmail(addr, text): provider = get_mail_provider() if provider == 'smtp': return smtp.sendmail(addr, text) if provider == 'mailgun': return mailgun.sendmail(addr, text) return False, "No mail settings configured"
def sendmail(addr, text): provider = get_mail_provider() if provider == "smtp": return smtp.sendmail(addr, text) if provider == "mailgun": print("Sending mail with Mailgun") return mailgun.sendmail(addr, text) return False, "No mail settings configured"
def sendmail(addr, text, subject="Message from {ctf_name}"): subject = safe_format(subject, ctf_name=get_config("ctf_name")) provider = get_mail_provider() if provider == "smtp": return smtp.sendmail(addr, text, subject) if provider == "mailgun": return mailgun.sendmail(addr, text, subject) return False, "No mail settings configured"