Re: support for dynamic envelope sender addresses
Shawn M Moore <[email protected]> Thu, 28 Jul 2016 16:03:59 -0400
| Newsgroups | gmane.comp.bug-tracking.request-tracker.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1223127149== Content-Type: multipart/signed; boundary="Apple-Mail=_3707491F-F07A-4CFE-9902-9514345BAF9B"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Apple-Mail=_3707491F-F07A-4CFE-9902-9514345BAF9B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 28, 2016, at 12:50, Sam Hanes <[email protected]> wrote: >=20 > Hi All, Hey Sam, > Is it likely that a patch to add a callback capable of setting the > envelope sender in `RT::Interface::Email::SendEmail()` would be = accepted > upstream? Yeah, we'd happily take such a patch. As you discovered, callbacks are = Mason-specific, so can't be used for this. The way we make library code = customizable is by factoring out a small, well-defined method, which a = local overlay can then redefine. A useful technique for this is to take a reference to the original sub = reference before redefining it, and then calling it within the = redefinition (which works a lot like a subclass dispatching to the = superclass's method). For an example of prior art, see = https://github.com/bestpractical/rt-extension-onetimeto/blob/a0da9368643/l= ib/RT/Extension/OneTimeTo.pm#L83-L97 > Should such a callback be passed a reference to the array of = `sendmail` > arguments so it can modify them as desired or should it be expected to > return an envelope sender address? A method that returns the list of sendmail arguments might be the best = fit. > Thanks for your consideration, > Sam Hanes Thanks, Shawn --Apple-Mail=_3707491F-F07A-4CFE-9902-9514345BAF9B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXmmUzAAoJEDdW4lQxRAUgLcMQAISKiBykLJN3DcJpKhllV8LR YjuNRlUXNpgwITKgnIg9r4887MNXK6msda3Kx8NI52GKebUgLD5qCpXjQzJGUv0N A2XpoOQmqv7eiPo6dKA9vEs/u0mAXVcmt1y8dw8brLI/xc3r+soufJ1cqgTzthUQ 6eG4TduRujDGvjMPxQsfXBTyo+KJrkhAprCePBi0WLwhAs8jmFwAhobr6iK0LG00 8H1iaAWznUI4LRCdNKvQEcBoouwnwM42VwEOiCqceJm8qHaXUKyvLfCudPvj819I YhBMkKN5ZNHJqirQM8Qib+AO0OaT+Ed8agwI4To4/t2/4KRAV77nTTe5XfGeuFo+ 3fcndgNWaCcSyw9KSNPH9MxQFYS/1g06oyId2pI85URhvj8si4P9qIVZ9PZ85aKF tpYkJJGv6q6ZPp1vWnG73bFNzZ9nSIWHrunnFhy0VlM3DtGLcf0FTPpYHui4kU1N Ws7QdJdA9rOkaNA5LzYmRAj3Xl+sDNj/8qkYeKiLsbcItDC8qGvHF7Wbd2SMqsmd zlxlw/pJTV9DEGxx8ZB+kK6Tf22wxIgdBk7fiL6JoS4dqCwquwDqNqPuNhYbitK0 68fAQwpy70RflgjoxRz6UzKgjSIIKd2OuiCH8XmB8b2fQt1EkLHvV+wdOCtUbVYV nQESEqwVFKlx2N3h1O/G =vRcm -----END PGP SIGNATURE----- --Apple-Mail=_3707491F-F07A-4CFE-9902-9514345BAF9B-- --===============1223127149== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --------- RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016 --===============1223127149==--