[rt-users] Attachements in correspondence

Jesse Vincent jesse at bestpractical.com
Wed Oct 10 20:43:10 EDT 2001


> Obviously, at least one other person on this list seems to think it
> would send the attachment with the response.

*nod*  We've actually had this one a few times before, too.  This addition
would be useful for more than just web updates, but also to send out attachments
that come in as part of MIME encoded mail messages.

I want this behaviour as well, It's just not high on my list. But I'd definitely
be happy to help you out making it go.

> looking at RT::Action::Notify, I see it ISA RT::Action::SendMessage.  
> SendMessage has a bunch of methods and it looks as if the Commit() method 
> actually pulls the parts together and creates the message.  Am I on the right
> track to override RT::Action::Notify::Commit() to put together the
> appropriate MIME headers and attach the content from some parts of the
> $self object?  Not being a Mason hack, I'm not sure from where I'd
> pull the CGI upload contents here.
> 


You're right that Notify ISA SendMessage.  You actually want to override
Prepare. (If Prepare succeeds, the scrips system calls Commit).

So, create NotifyWithAttachments.

set a sub Prepare that 
	calls SUPER::Prepare. 

	if that returns true, iterate through $self->TransactionObj->Attachments
	and add them to $self->TemplateObj->MIMEObj.

	(TransactionObj is an RT::Transaction object which already has all of
	this transaction's attachments already attached.  MIMEObj is a
	MIME::Entity.)


is that enough to get going?









> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
> 

-- 
http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.




More information about the rt-users mailing list