def send_postmark(to="", bcc="", subject="", plaintext=""): """ Send an email via Postmark. Used when the application is deployed on Heroku. """ try: message = PMMail(api_key = conf.POSTMARK_API_KEY, subject = subject, sender = conf.NOTIFICATION_EMAIL, text_body = plaintext) message.to = to if bcc != "": message.bcc = bcc message.send() except Exception as e: logger.exception("send_postmark raised:") raise e
def send_postmark(to="", bcc="", subject="", plaintext=""): """ Send an email via Postmark. Used when the application is deployed on Heroku. """ try: message = PMMail(api_key=conf.POSTMARK_API_KEY, subject=subject, sender=conf.NOTIFICATION_EMAIL, text_body=plaintext) message.to = to if bcc != "": message.bcc = bcc message.send() except Exception as e: logger.exception("send_postmark raised:") raise e
def send_postmark(to="", bcc="", subject="", plaintext=""): """ Send an email via Postmark. Used when the application is deployed on Heroku. Note: The Postmark team has chosen not to continue development of the Heroku add-on as of June 30, 2017. Newspipe is now using SendGrid when deployed on Heroku. """ from postmark import PMMail try: message = PMMail(api_key=conf.POSTMARK_API_KEY, subject=subject, sender=conf.NOTIFICATION_EMAIL, text_body=plaintext) message.to = to if bcc != "": message.bcc = bcc message.send() except Exception as e: logger.exception('send_postmark raised:') raise e
def send_postmark(to="", bcc="", subject="", plaintext=""): """ Send an email via Postmark. Used when the application is deployed on Heroku. Note: The Postmark team has chosen not to continue development of the Heroku add-on as of June 30, 2017. Newspipe is now using SendGrid when deployed on Heroku. """ from postmark import PMMail try: message = PMMail(api_key = conf.POSTMARK_API_KEY, subject = subject, sender = conf.NOTIFICATION_EMAIL, text_body = plaintext) message.to = to if bcc != "": message.bcc = bcc message.send() except Exception as e: logger.exception('send_postmark raised:') raise e