Defect #9655
closedI have a problem when i send an e-mail with attachments
0%
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
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.
Updated by sun yongwu over 13 years ago
- File 20111125105412.jpg 20111125105412.jpg added
@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"
Updated by Mischa The Evil over 13 years ago
I still don't get it.
sun yongwu wrote:
You say: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 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.
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"
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.