MailingListIntegration

From Request Tracker Wiki
Jump to: navigation, search

We like to give users the option to sign-up for a related mailing list when submitting a ticket. We use mailman, but this solution should be adaptable to other systems. Although there's Python::Serialise::Pickle, we were not comfortable twiddling mailman's private data store so we developed the following:

Scrip:

  • Name: On Create Inititate List Subscription
  • Condition: User defined
  • Action: Send email
  • Template: To: listName-subscribe@example.org From: { $Ticket->RequestorAddresses } Reply-To: { $Ticket->RequestorAddresses } Subject: Mailing list subscription Precedence: none Subscribe to mailing list.
  • Stage: TransactionCreate
  • Custom Condition: return 0 unless $self->TransactionObj->Type eq 'Create'; return $self->TicketObj->FirstCustomFieldValue('Subscribe') =~ /^(?:1|Y|Yes)$/i;

Note: Precedence header is important (at least for mailman), without it the message is simply discarded. Mailman also ignores reply-to, and operates on from, but the header is included as a safety measure, and may be necessary for other systems.