← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 791537] Re: V6.0.2: fetchmail-module can\'t import mail with attachements

 

Your solution works fine for double attachment in the same mail but will 
not work when the name of attachment is in several mail at same order.

We should better think of unique attachment sequence and something like

                 seq=obj.pool.get('ir.sequence').get(cr, uid, 
'ir.attachment')
                 attachments.append(att_obj.create(cr, uid, 
{'type':'binary','res_model':case._name,'res_id':case.id,'name': "[%03d] 
%s"%(seq,att[0]),
                     'datas': base64.encodestring(att[1])}))

creating a sequence number ir.attachment

Could not tested it though

Eric CAUDAL
eric.caudal@xxxxxxxxxxxxxx  <mailto:caudaleric@xxxxxxxxxxxxxx>
Cell phone: + 86 186 2136 1670

Elico Corp, Shanghai
OpenERP Ready Partner
http://www.elico-corp.com

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/791537

Title:
  V6.0.2: fetchmail-module can't import mail with attachements

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  when I try to download mails from pop or imap-server with fetchmail
  module everithing works well without attachements. As soon ther is an
  attachement I get the following error:

  [2011-06-01 22:02:58,988][test] INFO:imap:fetchmail start checking for new emails on hostpoint
  [2011-06-01 22:02:59,667][test] WARNING:pop:[01]: warning
  [2011-06-01 22:02:59,667][test] WARNING:pop:[02]: ValidateError

  The attachement is downloaded but the e-mail is not...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/791537/+subscriptions


References