Edgewall Software
Modify

Opened 19 years ago

Closed 8 years ago

#3054 closed enhancement (wontfix)

Include attached files with added attachment e-mail notifications for tickets.

Reported by: oscarmv@… Owned by:
Priority: normal Milestone:
Component: notification Version: 0.9.5
Severity: normal Keywords: attachments notification email
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When adding an attachment to a ticket, the notification e-mail sent should include it as an attachment.

An option could be added to limit this feature to files of up to a certain size.

Attachments (0)

Change History (11)

comment:1 by anonymous, 19 years ago

Resolution: invalid
Status: newclosed

Adding attachments to a ticket does not produce a notification.

comment:2 by Jonas Borgström, 19 years ago

Resolution: invalid
Status: closedreopened

Any reason why we should not send notification e-mails when attachments are added?

A link to the attachment is probably better than attaching it to the notification e-mail, this way we avoid having to add another "maximum file size" option.

comment:3 by Emmanuel Blot, 19 years ago

This could be a potential security issue, as an attached file might contain a malware.

I think a URL to the actual file would be a better solution.

comment:4 by Emmanuel Blot, 19 years ago

See also #2259

comment:5 by Christian Boos, 18 years ago

Component: ticket systemnotification
Milestone: 0.12

comment:6 by Asheesh Agrawal <asheesh.agrawal@…>, 15 years ago

ny update on whether this feature is still active and being looked at??

comment:7 by Remy Blank, 14 years ago

Milestone: next-major-0.1Xunscheduled

comment:8 by Ryan J Ollos, 10 years ago

Owner: Jonas Borgström removed
Status: reopenednew

comment:9 by Peter Suter, 8 years ago

Could maybe be implemented as a plugin? Untested:

from email.mime.application import MIMEApplication

from trac.core import Component, implements
from trac.notification.api import IEmailDecorator

class AttachmentEmailDecorator(Component):

    implements(IEmailDecorator)

    # IEmailDecorator methods
    
    def decorate_message(self, event, message, charset):
        if event.category == 'attachment added':
            attachment = event.attachment
            filename = attachment.filename
            with attachment.open() as fd:
                part = MIMEApplication(fd.read(), Name=filename)
            part['Content-Disposition'] = 'attachment; filename="%s"' % filename
            message.attach(part)

comment:10 by Ryan J Ollos, 8 years ago

See also th:#11642.

The plugin works well. It would probably be useful to have a debug level log message to indicate that the IEmailDecorator is called.

I favor putting it in the CookBook and closing this ticket. If we get enough requests for the feature we could reconsider adding it to tracopt.

comment:11 by Peter Suter, 8 years ago

Milestone: unscheduled
Resolution: wontfix
Status: newclosed

Yes, that sounds good to me. I created wiki:CookBook/Notification/Email.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.