[FIX] mail.mail: avoid prefetching attachment data in memory while processing mail...
authorOlivier Dony <odo@openerp.com>
Fri, 2 May 2014 14:44:31 +0000 (16:44 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 2 May 2014 14:44:31 +0000 (16:44 +0200)
commit61d212298773d0c49048fde9f0a1af9f1a2d1df1
tree47f11e4aeb9a11ba3c58f4531581ef4d15d66073
parentdeb091ea64f7f38a09938295e1cb80ee1689b778
[FIX] mail.mail: avoid prefetching attachment data in memory while processing mail queue, could fail due to memory limit

Specifically when there are many emails in the queue, prefetching
all their attachments at once when processing the first one
could fail, so not even one mail would be sent.

Added explicit logging when an email triggers a MemoryError,
as well as logging when each email is successfully sent.

bzr revid: odo@openerp.com-20140502144431-r3brgagl4gel4wmt
addons/mail/mail_mail.py