Project

General

Profile

Actions

Defect #9655

closed

I have a problem when i send an e-mail with attachments

Added by sun yongwu over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-11-24
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I have a problem when i send an e-mail with attachments which attachment filename is chinese .the result is I got the attachment in my e-mail is like "ATT009.pdf"
I do not know how to fix the problem ,please help me.


Files

20111125105412.jpg (15.3 KB) 20111125105412.jpg sun yongwu, 2011-11-25 03:55
Actions #1

Updated by Mischa The Evil over 13 years ago

Can you maybe describe your issue more detailed and maybe even accompanied by a screenshot? Also provide the information as outlined in submissions.

Actions #2

Updated by sun yongwu over 13 years ago

@attachment =Attachment.find(attachment_id)
diskfile=@attachment.diskfile
file_name=@attachment.filename
content_type = Redmine::MimeType.of(diskfile)

attachment :content_type=>content_type,
:filename =>file_name,
:body =>File.open(diskfile,"rb"){|io| io.read()}

and the filename is chinese like"中文.doc" but the e-mail attachment I got is like "ATT00013.doc"

Actions #3

Updated by Mischa The Evil over 13 years ago

I still don't get it.

sun yongwu wrote:

I have a problem when i send an e-mail with attachments which attachment filename is chinese .the result is I got the attachment in my e-mail is like "ATT009.pdf"

You say:
  • you send an email with attachment(s): to where? Redmine can process received mails to become issues automatically while the email attachments are added as attachments of the Redmine issue. However it does not look like your issue is related with this.
  • you received an email with attachment with has a malformed filename: from who? Redmine? Following the above, Redmine can send notification emails whenever new issues are created, but it does not include issue attachments as email attachments as far as I know. This leads me to the conclusion that this also does not relate to your issue.

Please be more comprehensive and detailed while describing your issue.

Actions #4

Updated by sun yongwu over 13 years ago

I do a secondary development on redmine source,I also configured an email server.Now I want to send an email from my redmine source. so my source is below:
@attachment =Attachment.find(attachment_id)
diskfile=@attachment.diskfile
file_name=@attachment.filename//"中文.doc"
content_type = Redmine::MimeType.of(diskfile)

attachment :content_type=>content_type,
:filename =>file_name,
:body =>File.open(diskfile,"rb"){|io| io.read()}
and the filename is chinese like"中文.doc" but the email attachment I get is like "ATT00013.doc"

Actions #5

Updated by Mischa The Evil over 13 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Sorry to say, but this is an issue tracker and not a discussion forum. Please feel free to start a new topic in the forums.

Actions

Also available in: Atom PDF