Project

General

Profile

Actions

Defect #10721

open

Loss of attachments while fetching emails from IMAP (GMail)

Defect #10721: Loss of attachments while fetching emails from IMAP (GMail)

Added by Anonymous over 14 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Email receiving
Resolution:
Affected version:

Description

When new issue is created by email fetched from gmail via redmine:email:receive_imap, attachments are ignored.

Steps to reproduce:

  1. send email with attachment to redmine GMail account.
  2. execute rake redmine:email:receive_imap RAILS_ENV=production
  3. go to issue list of the project

Expected: new issue was created with file attached to it. Mail in GMail box was cleared.

In fact: new issue is created but without attachments. Message is left in mailbox.


Files

versions.txt (328 Bytes) versions.txt Versions of software components Anonymous, 2012-04-20 06:37
redmine_attachments_save.diff (520 Bytes) redmine_attachments_save.diff Steffen Zieger, 2013-04-18 11:58
10721-fixed.patch (3.03 KB) 10721-fixed.patch Yuichi HARADA, 2020-05-26 04:20

Related issues 1 (1 open — 0 closed)

Related to Redmine - Patch #11499: Fixed attachments handling when receiving a new issue by mailNewActions

Updated by Максим Лазарев over 14 years ago Actions #1

have the same problem, tell me, please, what's the problem?

Updated by Gregory Engels over 14 years ago Actions #2

see also related issue #11499 (with a patch)

Updated by Steffen Zieger over 13 years ago Actions #3

The following patch is working for me on Redmine 2.3.0

Updated by Sebastian Paluch almost 11 years ago Actions #4

This is still needed for 3.2.0.

This is very minor change. Can this be addressed soon?

Updated by Moritz D over 10 years ago Actions #5

I'm using 3.2.0

same problem as issue author
"new issue is created but without attachments. Message is marked read and left in mailbox"

applying redmine_attachments_save.diff did not help. should it resolve the problem? is noone else using email attachments?

any suggestions?
thank you in advance

Updated by Prabhash Mishra over 10 years ago Actions #6

I too am having the same problem on Redmine 3.2.3
IMAP and Gmail
Ticket gets created but attachment is ignored.
The patch does not work either.
Does anyone have a fix on this? Please help...

Thanks & Regards,
Prabhash

Updated by Akhilesh Sabharwal over 10 years ago Actions #7

Facing the same issue on Redmine 3.3.0.
Facing the same issue. All functions of retrieving mail working, except for attachments. On IMAP / POP3

Could this be a function of the IMAP server?

In which case will try an alternative.

Thanks,
Akhilesh

Updated by Alexandr Meshkov about 10 years ago Actions #8

It works on Redmine 3.3.0, if you run the command via cron

Updated by Janeks Kamerovskis over 9 years ago Actions #9

I have the same problem with:

Environment:
Redmine version 3.3.3.stable
Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux-gnu]
Rails version 4.2.7.1
Environment production
Database adapter Mysql2

Where could I look / dig to find the solution?

brgds
Janeks

Updated by Nicolas Silberzahn over 8 years ago Actions #10

Please fix this! My Incomming emails from Evernote contains only inline images (hand writing)

Updated by Yuichi HARADA over 6 years ago Actions #11

The problem could not be reproduced, but the possible causes are:
  1. The process to add the attachments is performed after issue#save!
  2. Attachments are added directly to issue#attachments, but originally it must go through #saved_attachments defined in acts_as_attachable.

I created a patch.

Updated by Go MAEDA over 6 years ago Actions #12

  • Target version set to Candidate for next major release

Updated by Wicky Hu over 5 years ago Actions #13

I tested 10721-fixed.path in latest 4.2.0, it seems only working for one attachment.
If there are two or more attachments in email, then only the first attachment shown in notification mail.

I guess the reason is new issue email is created when first attachment added and issue saved, after that, remaining attachments added and saved.

Updated by anju dhiman over 5 years ago Actions #14

We also want to get all attachments from email when any ticket is creating.
Can you guys help us?

Updated by Nicolas Silberzahn over 5 years ago Actions #15

+1 (3 years after!)

Updated by anju dhiman over 5 years ago Actions #16

guys is there any possibility to have this feature?

Updated by Wicky Hu over 5 years ago Actions #17

I think to change the add_attachments method could solve the issue, basically to change << to build, not yet fully tested, but seems working.

#    obj.attachments << Attachment.create(:container => obj,
                    #                      :file => attachment.body.decoded,
                    #                      :filename => attachment.filename,
                    #                      :author => user,
                    #                      :content_type => attachment.mime_type)
obj.attachments.build(:container => obj,
                                          :file => attachment.body.decoded,
                                          :filename => attachment.filename,
                                          :author => user,
                                          :content_type => attachment.mime_type)
Actions

Also available in: PDF Atom