We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def send_simple_message(self, to, subject, html, text, site, customsettings): sender = f'GregoryAI <gregory@mg.{site.domain}>' response = requests.post( settings.EMAIL_MAILGUN_API_URL, auth=("api", settings.EMAIL_MAILGUN_API), data={ "from": sender, "to": to, "subject": subject, "text": text, "html": html } ) return response
here we return the response
for email in subscribers_email_list: self.send_simple_message( to=email, subject='Weekly Summary', html=html_content, text=text_content, site=site, customsettings=customsettings )
here we don't do anything with that response
We can have something like this
not_sent = [] for email in subscribers_email_list: r = self.send_simple_message( to=email, subject='Weekly Summary', html=html_content, text=text_content, site=site, customsettings=customsettings ) if r.statuscode != 200: not_sent.append(email)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Notes
here we return the response
here we don't do anything with that response
We can have something like this
The text was updated successfully, but these errors were encountered: