Skip to content
New issue

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

Sending bulk emails fails with MAIL_DEFAULT_SENDER config changes #36

Closed
maplebar opened this issue Apr 17, 2013 · 0 comments
Closed

Sending bulk emails fails with MAIL_DEFAULT_SENDER config changes #36

maplebar opened this issue Apr 17, 2013 · 0 comments

Comments

@maplebar
Copy link
Contributor

I have an app that is sending bulk emails using the DEFAULT_MAIL_SENDER. I just updated to 0.8.1 and changed the config to MAIL_DEFAULT_SENDER but the bulk emails have stopped working. It looks like Message.Send() is using the MAIL_DEFAULT_SENDER if needed, but Connection.Send() is not. Previously the Message.sender was set from the DEFAULT_MAIL_SENDER when the message was created so it didn't matter. The error log is below.

TypeError Traceback (most recent call last)
in ()
1 with mail.connect() as conn:
----> 2 conn.send(msg)
3

/home/jmapes/.virtualenvs/astdash/local/lib/python2.7/site-packages/flask_mail.pyc in send(self, message)
138 self.host.sendmail(message.sender,
139 message.send_to,
--> 140 message.as_string())
141
142 email_dispatched.send(message, app=current_app._get_current_object())

/home/jmapes/.virtualenvs/astdash/local/lib/python2.7/site-packages/flask_mail.pyc in as_string(self)
266
267 msg['Subject'] = self.subject
--> 268 msg['From'] = sanitize_address(self.sender)
269 msg['To'] = ', '.join(list(set(sanitize_addresses(self.recipients))))
270

/home/jmapes/.virtualenvs/astdash/local/lib/python2.7/site-packages/flask_mail.pyc in sanitize_address(addr, encoding)
64 if isinstance(addr, basestring):
65 addr = parseaddr(force_text(addr))
---> 66 nm, addr = addr
67
68 # This try-except clause is needed on Python 3 < 3.2.4

TypeError: 'NoneType' object is not iterable

mattupstate pushed a commit that referenced this issue Apr 25, 2013
Fix for issue #36 bulk emails using MAIL_DEFAULT_SENDER
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant