Defect #18181
closedCannot send custom mail notifications with attachments
0%
Description
Good day!
Sorry, I don't know which tracker should I choose to publish my question. I think this is not Redmine's bug, but my mistake.
Sorry for my bad English too :)
I have some custom email templates (one (pair) of them is in attachment to the Issue) and extended mailer.rb: in issue_edit() I try to send specific email-notifications to users with the specific role (is_support?(project)). I do this before native mailing (see mailer.rb issue_edit() function). I need to include attachments to my custom notifications, not links - just files in email (attachments[fnam] = File.read(full, mode: 'rb') on Windows OS)
). So, native notifications are sending with no problems - there are all file attachments of any types (jpg/zip/pdf/doc/etc...), but my custom notifications have no any attachment.
I opened the email original in GMail and saw that there were differencies in content types. Normal (with attachments) has content_type 'multipartial/mixed', but my custom letter has content_type 'multipart/alternative'.
I've tried to pass content_type in mailer.rb code, but it corrupts the letter at all.
Please, can you give me an advice or an example of working code.
Thanks!
Files
Updated by Jean-Philippe Lang over 10 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Sorry but this tracker is for Redmine core issues only, you may want to take a chance in the forums.