~credativ/poweremail/poweremail

« back to all changes in this revision

Viewing changes to poweremail_mailbox.py

  • Committer: Albert Cervera i Areny
  • Date: 2010-06-11 10:13:55 UTC
  • Revision ID: albert@nan-tic.com-20100611101355-rg4h0aoijobw3rr1
[FIX] If 'pem_to' is null, empty or 'False' do not try to send the e-mail. Many users do not give a fallback mail account and this causes poweremail to do thousands of retries until the email is removed from the outbox.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
            try:
114
114
                core_obj = self.pool.get('poweremail.core_accounts')
115
115
                values = self.read(cr, uid, id, [], context) #Values will be a dictionary of all entries in the record ref by id
 
116
                pem_to = (values['pem_to'] or '').strip()
 
117
                if pem_to in ('', 'False'):
 
118
                        continue
116
119
                payload = {}
117
120
                if values['pem_attachments_ids']:
118
121
                    #Get filenames & binary of attachments