python - Send mass mail in Django -- Too many values to unpack -


i'm experimenting django's mass_mail function. code below keeps raising "too many values unpack" error, , can't figure out why. i'm following docs (https://docs.djangoproject.com/en/1.5/topics/email/#send-mass-mail) seem pretty straightforward--what doing wrong? if matters, send-email address made up, can't see mattering.

if matching_record.level == 1:                 users = self._get_users_to_be_notified(matching_record.category)                 email_recipients = [str(user.email) user in users if user.email]                 message = 'here requested notification service "%s" having technical difficulties , has been set "critical".' %matching_record.name                 mail_tuple = ('notification',                                message,                                'notifications@service.com',                                email_recipients)                 send_mass_mail(mail_tuple) 

send_mass_mail method's first argument tuple of message tuples, sending message tuple. change function calling below , check if works:

send_mass_mail((mail_tuple,)) 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -