Author Topic: POP3 mail duplication  (Read 1855 times)

kaptanbu

  • Newbie
  • *
  • Posts: 2
    • View Profile
POP3 mail duplication
« on: December 06, 2009, 01:15:38 am »
Hi,

  I installed opengoo in my desktop pc. In email section, i configured my email account as POP3 account. When i click check mail button,  fetched  my all emails.  It seems thats ok. but the problem is that second time when click button, all emails came again. All emails duplicated and every time all emails came again and again. 

   I use thunderbird as default email client. In mailclient,   retrieving configuration set as "Leave message in server".   Opengoo fetch all mails as new mails.

I tried opengoo 1.5.3 and 1.6.rc. The problem is the same in this version.

Please help.

Thanks,
by the way, opengoo is great!


 

kaptanbu

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: POP3 mail duplication
« Reply #1 on: December 06, 2009, 07:18:38 pm »
I found a solution.

 I created "unique index" in table "og_mail_contents" according to fields "account_id" and "uid". So All mails fetch from server again but system can not record the same messages.

this is temporary solution. I hope u will find permanent solution.

Thanks...

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: POP3 mail duplication
« Reply #2 on: December 08, 2009, 11:19:24 am »
That will give you problems when sending emails from OpenGoo. You will have to change this too in file 'application/controllers/MailController.class.php' line 414:

from:
Code: [Select]
$mail->setUid('UID');

to:
Code: [Select]
$mail->setUid(gen_id());

It's so strange that adding a unique key solves the issue, because it is already supposed to be checking if an email with the same UID in the same account exists before saving it, and I didn't notice any problem with that code, nor I am having that issue.